[FFmpeg-devel] [PATCH 2/3] tools/decode_simple: initialize decoder parameters with container info
Anton Khirnov
anton at khirnov.net
Tue Oct 18 14:51:58 EEST 2022
---
tools/decode_simple.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/decode_simple.c b/tools/decode_simple.c
index 8dc3bd2054..cd81d53168 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.35.1
More information about the ffmpeg-devel
mailing list