From c40ecffd31d0e0be531425e48a98c1a8fcaaffa2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 21 Jul 2015 13:23:29 +0200 Subject: Replace AV_PKT_DATA_QUALITY_FACTOR by AV_PKT_DATA_QUALITY_STATS The stats are a superset of the quality factor, also allowing the picture type and encoder "PSNR" stats to be exported This also replaces the native by fixed little endian order for the affected side data AV_PKT_DATA_QUALITY_FACTOR is left as a synonym of AV_PKT_DATA_QUALITY_STATS Signed-off-by: Michael Niedermayer --- ffmpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ffmpeg.c') diff --git a/ffmpeg.c b/ffmpeg.c index ce9cac7846..751c7d350d 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -669,9 +669,9 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) ost->frame_number++; } if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) { - uint8_t *sd = av_packet_get_side_data(pkt, AV_PKT_DATA_QUALITY_FACTOR, + uint8_t *sd = av_packet_get_side_data(pkt, AV_PKT_DATA_QUALITY_STATS, NULL); - ost->quality = sd ? *(int *)sd : -1; + ost->quality = sd ? AV_RL32(sd) : -1; } if (bsfc) -- cgit v1.2.3