diff options
Diffstat (limited to 'tools/decode_simple.c')
-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: |