vlc | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Wed Jan 16 
12:26:48 2019 +0100| [9da41db10758e8cfef142f3d2a1542439d723230] | committer: 
Steve Lhomme

packetizer: h264: fix pts < dts from POC

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9da41db10758e8cfef142f3d2a1542439d723230
---

 modules/packetizer/h264.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index fa66523c46..3b65de9e82 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -941,6 +941,9 @@ static block_t *OutputPicture( decoder_t *p_dec )
                 date_Decrement( &pts, -diff );
 
             p_pic->i_pts = date_Get( &pts );
+            /* non monotonically increasing dts on some videos 33333 
33333...35000 */
+            if( p_pic->i_pts < p_pic->i_dts )
+                p_pic->i_pts = p_pic->i_dts;
         }
         /* In case there's no PTS at all */
         else if( CanSwapPTSwithDTS( &p_sys->slice, p_sps ) )

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to