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.
This commit is contained in:
Rudolf Polzer 2013-06-17 17:33:50 +02:00
parent 1d75d01392
commit 66f09d7384
1 changed files with 4 additions and 0 deletions

View File

@ -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);