]> granicus.if.org Git - handbrake/commitdiff
merge fix for audio gaps to bugfix branch
authorjstebbins <jstebbins.hb@gmail.com>
Sun, 1 Apr 2012 15:40:08 +0000 (15:40 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Sun, 1 Apr 2012 15:40:08 +0000 (15:40 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.9.x@4575 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/decavcodec.c

index fd58c5c285c3a395c6c6aaa0e6fe956dafd2a048..80c68fd4d346f0536f8c0a1e64d71f3d23b40cf7 100644 (file)
@@ -1409,7 +1409,9 @@ static void decodeAudio( hb_audio_t * audio, hb_work_private_t *pv, uint8_t *dat
     int pos = 0;
     int loop_limit = 256;
 
-    if ( pts != -1 )
+    // If we are givn a pts, use it.
+    // But don't loose partial ticks.
+    if ( pts != -1 && (int64_t)pv->pts_next != pts )
         pv->pts_next = pts;
     while ( pos < size )
     {