[vlc-commits] codec: avcodec: use filtered/best effort pts
    Francois Cartegnie 
    git at videolan.org
       
    Thu Feb 25 09:55:34 UTC 2021
    
    
  
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Dec 12 13:07:49 2020 +0100| [0834d39352a299f1ada6b319fff43f3c34b9d52a] | committer: Francois Cartegnie
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0834d39352a299f1ada6b319fff43f3c34b9d52a
---
 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 baff3e4621..8872fba0a0 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
    
    
More information about the vlc-commits
mailing list