[FFmpeg-devel] [PATCH 3/7] tools/decode_simple: initialize decoder parameters with container info
Anton Khirnov
anton at khirnov.net
Fri Mar 24 11:14:47 EET 2023
---
tools/decode_simple.c | 4 ++++
1 file changed, 4 insertions(+)
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:
--
2.39.1
More information about the ffmpeg-devel
mailing list