changeset 36421:0d7459fc4354

Fix pts handling with -framedrop.
author reimar
date Mon, 18 Nov 2013 19:54:22 +0000
parents b8ccbb9b9dad
children 0012cdc65efd
files libmpcodecs/dec_video.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/dec_video.c	Sat Nov 16 23:31:56 2013 +0000
+++ b/libmpcodecs/dec_video.c	Mon Nov 18 19:54:22 2013 +0000
@@ -424,6 +424,8 @@
             sh_video->num_buffered_pts++;
         }
     }
+    if (correct_pts && mpi && drop_frame && sh_video->num_buffered_pts > 0)
+        sh_video->num_buffered_pts--;
 
     // some codecs are broken, and doesn't restore MMX state :(
     // it happens usually with broken/damaged files.