mirror of
https://github.com/mpv-player/mpv
synced 2025-02-02 21:21:33 +00:00
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:
parent
1d75d01392
commit
66f09d7384
@ -428,7 +428,11 @@ static void draw_image(struct vo *vo, mp_image_t *mpi)
|
|||||||
frame->pts = av_rescale_q(vc->lastipts + skipframes,
|
frame->pts = av_rescale_q(vc->lastipts + skipframes,
|
||||||
vc->worst_time_base, avc->time_base);
|
vc->worst_time_base, avc->time_base);
|
||||||
|
|
||||||
|
enum AVPictureType savetype = frame->pict_type;
|
||||||
mp_image_copy_fields_to_av_frame(frame, vc->lastimg);
|
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;
|
frame->quality = avc->global_quality;
|
||||||
|
|
||||||
av_init_packet(&packet);
|
av_init_packet(&packet);
|
||||||
|
Loading…
Reference in New Issue
Block a user