[FFmpeg-devel] [PATCH] ffplay: set codec_id in codec context

Stefano Sabatini stefasab at gmail.com
Sun Dec 16 11:04:58 CET 2012


On date Saturday 2012-12-15 23:34:01 +0100, Marton Balint encoded:
> 
> 
> On Sat, 15 Dec 2012, Stefano Sabatini wrote:
> 
> >Set codec id in case another codec is forced on the context (e.g. when
> >the user specify the codec with -codec).
> >
> >For example fix:
> >ffplay -vcodec pgmyuv -i "tests/vsynth1/%02d.pgm"
> >---
> >ffplay.c |    1 +
> >1 file changed, 1 insertion(+)
> >
> >diff --git a/ffplay.c b/ffplay.c
> >index 1bd07f4..a45def4 100644
> >--- a/ffplay.c
> >+++ b/ffplay.c
> >@@ -2317,6 +2317,7 @@ static int stream_component_open(VideoState *is, int stream_index)
> >    if (!codec)
> >        return -1;
> >
> >+    avctx->codec_id = codec->id;
> >    avctx->workaround_bugs   = workaround_bugs;
> >    avctx->lowres            = lowres;
> >    if(avctx->lowres > codec->max_lowres){
> 
> LGTM, thanks,

Applied.
-- 
FFmpeg = Fascinating & Free Mastering Pitiful Enlightened Gadget


More information about the ffmpeg-devel mailing list