[vlc-devel] [PATCH 2/2] codec: avcodec: use filtered/best effort pts
Francois Cartegnie
fcvlcdev at free.fr
Fri Feb 5 14:33:01 UTC 2021
fixes playback/stuttering with wrong mux/monotonically
increasing pts on frames that must be reordered.
no change for regular pts.
---
modules/codec/avcodec/video.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index baff3e46214..8872fba0a03 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1079,7 +1079,11 @@ static int DecodeBlock( decoder_t *p_dec, block_t **pp_block )
/* Compute the PTS */
#if LIBAVCODEC_VERSION_CHECK( 57, 24, 0, 61, 100 )
+# if LIBAVCODEC_VERSION_MICRO >= 100
+ int64_t av_pts = frame->best_effort_timestamp;
+# else
int64_t av_pts = frame->pts;
+# endif
#else
int64_t av_pts = frame->pkt_pts;
#endif
--
2.26.2
More information about the vlc-devel
mailing list