diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-04-20 09:08:00 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-05-02 10:59:24 +0200 |
commit | 52b632b65be91264543065296a6a197d2a087c70 (patch) | |
tree | 2e37c591fb1b9326c88b9bdc824f43b95b8e8bd4 /fftools | |
parent | f4a60b8ddc07b9385b601d18c00c600b50402481 (diff) | |
download | ffmpeg-52b632b65be91264543065296a6a197d2a087c70.tar.gz |
fftools/ffmpeg: drop OutputStream.pict_type
It is no longer used outside of update_video_stats(), so make it a stack
variable in that function.
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg.h | 3 | ||||
-rw-r--r-- | fftools/ffmpeg_enc.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index a41bc9b518..c3cb365a3b 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -671,9 +671,6 @@ typedef struct OutputStream { /* packet quality factor */ int quality; - /* packet picture type */ - int pict_type; - /* frame encode sum of squared error values */ int64_t error[4]; diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index 859c7fdeee..096e0ce14a 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -587,11 +587,12 @@ static void update_video_stats(OutputStream *ost, const AVPacket *pkt, int write const uint8_t *sd = av_packet_get_side_data(pkt, AV_PKT_DATA_QUALITY_STATS, NULL); AVCodecContext *enc = ost->enc_ctx; + enum AVPictureType pict_type; int64_t frame_number; double ti1, bitrate, avg_bitrate; ost->quality = sd ? AV_RL32(sd) : -1; - ost->pict_type = sd ? sd[4] : AV_PICTURE_TYPE_NONE; + pict_type = sd ? sd[4] : AV_PICTURE_TYPE_NONE; for (int i = 0; i<FF_ARRAY_ELEMS(ost->error); i++) { if (sd && i < sd[5]) @@ -634,7 +635,7 @@ static void update_video_stats(OutputStream *ost, const AVPacket *pkt, int write avg_bitrate = (double)(e->data_size * 8) / ti1 / 1000.0; fprintf(vstats_file, "s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ", (double)e->data_size / 1024, ti1, bitrate, avg_bitrate); - fprintf(vstats_file, "type= %c\n", av_get_picture_type_char(ost->pict_type)); + fprintf(vstats_file, "type= %c\n", av_get_picture_type_char(pict_type)); } static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame) |