summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorRudolf Polzer <divverent@xonotic.org>2013-06-17 17:33:50 +0200
committerRudolf Polzer <divverent@xonotic.org>2013-06-17 17:33:50 +0200
commit66f09d7384ce39e53aeaf0a8cccf071d4c938e72 (patch)
treee1005328d4ec3fd4e2edefd91b66feea6a463c4a /video
parent1d75d013927f99ccc1342388ebbaa19b206beb67 (diff)
downloadmpv-66f09d7384ce39e53aeaf0a8cccf071d4c938e72.tar.bz2
mpv-66f09d7384ce39e53aeaf0a8cccf071d4c938e72.tar.xz
vo_lavc: do NOT fill pict_type from the mp_image
Doing this makes the encoder force the same pict type as original, which is often not even possible. Rather let the codec decide! As there is no documented value to mean "decoder shall pick", I rather save/restore the default value filled by libavcodec.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_lavc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/vo_lavc.c b/video/out/vo_lavc.c
index 4da8733d14..78e772b54c 100644
--- a/video/out/vo_lavc.c
+++ b/video/out/vo_lavc.c
@@ -428,7 +428,11 @@ static void draw_image(struct vo *vo, mp_image_t *mpi)
frame->pts = av_rescale_q(vc->lastipts + skipframes,
vc->worst_time_base, avc->time_base);
+ enum AVPictureType savetype = frame->pict_type;
mp_image_copy_fields_to_av_frame(frame, vc->lastimg);
+ frame->pict_type = savetype;
+ // keep this at avcodec_get_frame_defaults default
+
frame->quality = avc->global_quality;
av_init_packet(&packet);