diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-10-18 13:37:25 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-03-28 13:00:42 +0200 |
commit | 554c6d7cb1aa529f8189af3f4655283d39291809 (patch) | |
tree | c93de8cf7daa00b0a10cc05dc3435a651a478354 | |
parent | 992e984fa86ed4447082be4915996908b6acf3b5 (diff) | |
download | ffmpeg-554c6d7cb1aa529f8189af3f4655283d39291809.tar.gz |
tools/decode_simple: initialize decoder parameters with container info
-rw-r--r-- | tools/decode_simple.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/decode_simple.c b/tools/decode_simple.c index 8a9e7c5f71..6532e368d4 100644 --- a/tools/decode_simple.c +++ b/tools/decode_simple.c @@ -149,6 +149,10 @@ int ds_open(DecodeContext *dc, const char *url, int stream_idx) if (!dc->decoder) return AVERROR(ENOMEM); + ret = avcodec_parameters_to_context(dc->decoder, dc->stream->codecpar); + if (ret < 0) + goto fail; + return 0; fail: |