[libav-devel] [PATCH 1/2] ffmpeg: fix operation with --disable-avfilter
Anton Khirnov
anton at khirnov.net
Sun Jul 17 17:58:11 CEST 2011
On Sun, 17 Jul 2011 15:28:53 +0100, Mans Rullgard <mans at mansr.com> wrote:
> The width and height must be copied from the input before
> being used.
>
> Signed-off-by: Mans Rullgard <mans at mansr.com>
> ---
> ffmpeg.c | 11 +++++++----
> 1 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/ffmpeg.c b/ffmpeg.c
> index cbbd3e7..de5b8c2 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -2219,6 +2219,12 @@ static int transcode(AVFormatContext **output_files,
> fprintf(stderr, "Video pixel format is unknown, stream cannot be encoded\n");
> ffmpeg_exit(1);
> }
> +
> + if (!codec->width || !codec->height) {
> + codec->width = icodec->width;
> + codec->height = icodec->height;
> + }
> +
> ost->video_resample = codec->width != icodec->width ||
> codec->height != icodec->height ||
> codec->pix_fmt != icodec->pix_fmt;
> @@ -2245,10 +2251,7 @@ static int transcode(AVFormatContext **output_files,
> #endif
> codec->bits_per_raw_sample= 0;
> }
> - if (!codec->width || !codec->height) {
> - codec->width = icodec->width;
> - codec->height = icodec->height;
> - }
> +
> ost->resample_height = icodec->height;
> ost->resample_width = icodec->width;
> ost->resample_pix_fmt= icodec->pix_fmt;
> --
> 1.7.6
>
Ok.
--
Anton Khirnov
More information about the libav-devel
mailing list