vlc/vlc-3.0 | branch: master | Francois Cartegnie <[email protected]> | Wed Jan 
16 12:26:48 2019 +0100| [8bb5cacc14fd6fca2f403354143feade01a616c7] | committer: 
Thomas Guillem

packetizer: h264: fix pts < dts from POC

(cherry picked from commit 9da41db10758e8cfef142f3d2a1542439d723230)
Signed-off-by: Thomas Guillem <[email protected]>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=8bb5cacc14fd6fca2f403354143feade01a616c7
---

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

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index efefc57e6f..c625005c8e 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -939,6 +939,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
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to