From: Stefano Sabatini Date: Sat, 15 Dec 2012 21:42:21 +0000 (+0100) Subject: ffplay: set codec_id in codec context X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=1cbb11cda79eb9796ba5d00653819706c566dab8;p=ffmpeg ffplay: set codec_id in codec context 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" --- diff --git a/ffplay.c b/ffplay.c index 3384c6cba59..2561a07419f 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){