diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-12-16 19:10:12 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-05-24 13:46:57 +0200 |
commit | b033913d1c5998a29dfd13e9906dd707ff6eff12 (patch) | |
tree | 35dd98b6be0108b84d3195876870b5c14da4ad97 /fftools/ffmpeg_mux.c | |
parent | 0c914ebd533826b20212e10896c175ff379470cf (diff) |
fftools/ffmpeg: move processing AV_PKT_DATA_QUALITY_STATS to do_video_stats()
This is a more appropriate place for this code, since the values we read
from AV_PKT_DATA_QUALITY_STATS side data are primarily written into
video stats. This ensures that the values written into stats actually
apply to the right packet.
Rename the function to update_video_stats() to better reflect its new
purpose.
Diffstat (limited to 'fftools/ffmpeg_mux.c')
-rw-r--r-- | fftools/ffmpeg_mux.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 3cdaa494d7..794d580635 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -101,19 +101,6 @@ void of_write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, pkt->pts = pkt->dts = AV_NOPTS_VALUE; if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { - int i; - uint8_t *sd = av_packet_get_side_data(pkt, AV_PKT_DATA_QUALITY_STATS, - NULL); - ost->quality = sd ? AV_RL32(sd) : -1; - ost->pict_type = sd ? sd[4] : AV_PICTURE_TYPE_NONE; - - for (i = 0; i<FF_ARRAY_ELEMS(ost->error); i++) { - if (sd && i < sd[5]) - ost->error[i] = AV_RL64(sd + 8 + 8*i); - else - ost->error[i] = -1; - } - if (ost->frame_rate.num && ost->is_cfr) { if (pkt->duration > 0) av_log(NULL, AV_LOG_WARNING, "Overriding packet duration by frame rate, this should not happen\n"); |