mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-01 21:48:15 +08:00
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"
This commit is contained in:
1
ffplay.c
1
ffplay.c
@ -2317,6 +2317,7 @@ static int stream_component_open(VideoState *is, int stream_index)
|
|||||||
if (!codec)
|
if (!codec)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
avctx->codec_id = codec->id;
|
||||||
avctx->workaround_bugs = workaround_bugs;
|
avctx->workaround_bugs = workaround_bugs;
|
||||||
avctx->lowres = lowres;
|
avctx->lowres = lowres;
|
||||||
if(avctx->lowres > codec->max_lowres){
|
if(avctx->lowres > codec->max_lowres){
|
||||||
|
Reference in New Issue
Block a user