---
 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

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to