[vlc-commits] [Git][videolan/vlc][3.0.x] codec: avcodec: use filtered/best effort pts

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Tue Mar 8 11:31:38 UTC 2022



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
8dc979d5 by Francois Cartegnie at 2022-03-08T11:18:16+00:00
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 0834d39352a299f1ada6b319fff43f3c34b9d52a)

- - - - -


1 changed file:

- modules/codec/avcodec/video.c


Changes:

=====================================
modules/codec/avcodec/video.c
=====================================
@@ -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



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8dc979d5787032a1bc38c5b09544db1e0556d9db

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8dc979d5787032a1bc38c5b09544db1e0556d9db
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list