[FFmpeg-devel] [PATCH] ffprobe: Stash and use width and height before opening the codec

Stefano Sabatini stefasab at gmail.com
Tue Mar 19 19:54:14 CET 2013


On date Tuesday 2013-03-19 01:52:35 +0100, Michael Niedermayer encoded:
> On Tue, Mar 19, 2013 at 01:37:23AM +0100, Stefano Sabatini wrote:
[...]
> >  libavcodec/utils.c |    6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> > index 94e8b57..a703b3b 100644
> > --- a/libavcodec/utils.c
> > +++ b/libavcodec/utils.c
> > @@ -1078,9 +1078,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
> >      if ((ret = av_opt_set_dict(avctx, &tmp)) < 0)
> >          goto free_and_end;
> >  
> > -    //We only call avcodec_set_dimensions() for non h264 codecs so as not to overwrite previously setup dimensions
> > -    if (!( avctx->coded_width && avctx->coded_height && avctx->width && avctx->height && avctx->codec_id == AV_CODEC_ID_H264)){
> > -
> > +    // call avcodec_set_dimensions() for non H.264/VP6F codecs so as not to overwrite previously setup dimensions
> > +    if (!(avctx->coded_width && avctx->coded_height && avctx->width && avctx->height &&
> > +          (avctx->codec_id == AV_CODEC_ID_H264 || avctx->codec_id == AV_CODEC_ID_VP6F)) {
> 
> i count 3 ( but only 2 )

Updated and tested with FATE.
-- 
FFmpeg = Forgiving and Fundamentalist Mystic Practical Ephemeral God
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavc-utils-add-VP6F-hack-for-setting-correct-video-s.patch
Type: text/x-diff
Size: 1908 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130319/d9a865ea/attachment.bin>


More information about the ffmpeg-devel mailing list