tools/decode_simple: initialize decoder parameters with container info
This commit is contained in:
parent
992e984fa8
commit
554c6d7cb1
|
@ -149,6 +149,10 @@ int ds_open(DecodeContext *dc, const char *url, int stream_idx)
|
||||||
if (!dc->decoder)
|
if (!dc->decoder)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
ret = avcodec_parameters_to_context(dc->decoder, dc->stream->codecpar);
|
||||||
|
if (ret < 0)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
|
Loading…
Reference in New Issue