diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-04-11 10:15:55 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-04-17 12:01:40 +0200 |
commit | a064aed4c37836468f4156e6b3aaf150a626fa50 (patch) | |
tree | 5833f19dd2ccfb1b6fe6d36be29d2249f1c6b399 /fftools/ffmpeg.c | |
parent | de38e17583bf5b542188810c1079abcf0c9ff8da (diff) | |
download | ffmpeg-a064aed4c37836468f4156e6b3aaf150a626fa50.tar.gz |
fftools/ffmpeg: store stream media type in OutputStream
Reduces access to a deeply nested muxer property
OutputStream.st->codecpar->codec_type for this fundamental and immutable
stream property.
Besides making the code shorter, this will allow making the AVStream
(OutputStream.st) private to the muxer in the future.
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r-- | fftools/ffmpeg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 14861fec4e..d143244e7c 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -748,12 +748,12 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti const AVCodecContext * const enc = ost->enc_ctx; const float q = enc ? ost->quality / (float) FF_QP2LAMBDA : -1; - if (vid && ost->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { + if (vid && ost->type == AVMEDIA_TYPE_VIDEO) { av_bprintf(&buf, "q=%2.1f ", q); av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n", ost->file_index, ost->index, q); } - if (!vid && ost->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { + if (!vid && ost->type == AVMEDIA_TYPE_VIDEO) { float fps; uint64_t frame_number = atomic_load(&ost->packets_written); |