changeset 1554:1eaba8bc0ab1 libavformat

do not truncate pts/dts if value is AV_NOPTS_VALUE, patch by Andy Parkins, andrew parkins at 360visiontechnology com
author bcoudurier
date Wed, 06 Dec 2006 15:46:12 +0000
parents 504ceaa50e31
children 5f829140788e
files utils.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Wed Dec 06 00:23:04 2006 +0000
+++ b/utils.c	Wed Dec 06 15:46:12 2006 +0000
@@ -2288,8 +2288,12 @@
 //    if(pkt->dts < 0)
 //        pkt->dts= 0;  //this happens for low_delay=0 and b frames, FIXME, needs further invstigation about what we should do here
 
-    pkt->pts &= pts_mask;
-    pkt->dts &= pts_mask;
+    if( pkt->pts != AV_NOPTS_VALUE ) {
+        pkt->pts &= pts_mask;
+    }
+    if( pkt->dts != AV_NOPTS_VALUE ) {
+        pkt->dts &= pts_mask;
+    }
 }
 
 /**