[FFmpeg-devel] [PATCH] ffprobe: Stash and use width and height before opening the codec
Derek Buitenhuis
derek.buitenhuis at gmail.com
Wed Mar 6 18:55:10 CET 2013
On 2013-03-01 10:41 AM, Derek Buitenhuis wrote:
> Some codecs, such as VP6, will only have their correct width and
> height set if a few frames have been decoded. This is accomplished
> when we call avformat_find_stream_info(). However, we call
> avcodec_open2() after this, which can possibly reset the width
> and height in the decoder's context to an erroneous value.
>
> Stash and propagate the width and height after calling
> avformat_find_stream_info(), but before calling avcodec_open2().
>
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
> ffprobe.c | 46 ++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 36 insertions(+), 10 deletions(-)
Ping.
> -
> - /* fill the streams in the format context */
> if ((err = avformat_find_stream_info(fmt_ctx, NULL)) < 0) {
> print_error(filename, err);
> return err;
Was accidental. Fixed locally.
- Derek
More information about the ffmpeg-devel
mailing list