From 554c6d7cb1aa529f8189af3f4655283d39291809 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 18 Oct 2022 13:37:25 +0200 Subject: [PATCH] tools/decode_simple: initialize decoder parameters with container info --- 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: