From 66f09d7384ce39e53aeaf0a8cccf071d4c938e72 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 17 Jun 2013 17:33:50 +0200 Subject: 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. --- video/out/vo_lavc.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3