diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-01-23 18:42:20 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-01-30 09:52:00 +0100 |
commit | 1b2c539a0f4b48ed124ff6dc375bd67111efdddc (patch) | |
tree | 9bc33cde252151a5247911834e03229cd36fc586 /fftools/ffmpeg_dec.c | |
parent | b3d1916ba03086d9d1e80a2ff5fdee2c915152ae (diff) | |
download | ffmpeg-1b2c539a0f4b48ed124ff6dc375bd67111efdddc.tar.gz |
fftools/ffmpeg_dec: pass AVCodecParameters through DecoderOpts
Do not retrieve it from InputStream directly.
This is a step towards decoupling Decoder and InputStream.
Diffstat (limited to 'fftools/ffmpeg_dec.c')
-rw-r--r-- | fftools/ffmpeg_dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c index e41440b21d..c35fceeaf4 100644 --- a/fftools/ffmpeg_dec.c +++ b/fftools/ffmpeg_dec.c @@ -990,13 +990,13 @@ int dec_open(InputStream *ist, Scheduler *sch, unsigned sch_idx, return AVERROR(ENOMEM); } - dp->sar_override = ist->par->sample_aspect_ratio; + dp->sar_override = o->par->sample_aspect_ratio; dp->dec_ctx = avcodec_alloc_context3(codec); if (!dp->dec_ctx) return AVERROR(ENOMEM); - ret = avcodec_parameters_to_context(dp->dec_ctx, ist->par); + ret = avcodec_parameters_to_context(dp->dec_ctx, o->par); if (ret < 0) { av_log(dp, AV_LOG_ERROR, "Error initializing the decoder context.\n"); return ret; |