mirror of https://code.videolan.org/videolan/vlc
codec: avcodec: use filtered/best effort pts
fixes playback/stuttering with wrong mux/monotonically
increasing pts on frames that must be reordered.
no change for regular pts.
(cherry picked from commit 0834d39352
)
This commit is contained in:
parent
e63e7a0634
commit
8dc979d578
|
@ -1117,7 +1117,11 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block, bool *error
|
|||
|
||||
/* Compute the PTS */
|
||||
#if LIBAVCODEC_VERSION_CHECK(57, 24, 0, 61, 100)
|
||||
# if LIBAVCODEC_VERSION_MICRO >= 100
|
||||
mtime_t i_pts = frame->best_effort_timestamp;
|
||||
# else
|
||||
mtime_t i_pts = frame->pts;
|
||||
# endif
|
||||
#else
|
||||
mtime_t i_pts = frame->pkt_pts;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue