changeset 1188:19f761156b1f libavformat

Set duration to AV_NOPTS_VALUE instead of 0 when unknown. Set start_time to 0 when duration is known to indicate we have valid timestamps for this track.
author reimar
date Fri, 28 Jul 2006 13:31:08 +0000
parents 5c7b35fc0588
children fb1a9ccffe89
files mxf.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mxf.c	Wed Jul 26 01:12:26 2006 +0000
+++ b/mxf.c	Fri Jul 28 13:31:08 2006 +0000
@@ -215,7 +215,7 @@
     ByteIOContext *pb = &mxf->fc->pb;
     uint8_t sequence_uid[16];
     uint8_t data_definition[16];
-    uint64_t duration = 0;
+    uint64_t duration = AV_NOPTS_VALUE;
     int bytes_read = 0;
     int i;
 
@@ -241,6 +241,7 @@
 
     for (i = 0; i < mxf->tracks_count; i++)
         if (!memcmp(sequence_uid, mxf->tracks[i].sequence_uid, 16)) {
+            mxf->tracks[i].stream->start_time = 0;
             mxf->tracks[i].stream->duration = duration;
             if (data_definition[11] == 0x02 && data_definition[12] == 0x01)
                 mxf->tracks[i].stream->codec->codec_type = CODEC_TYPE_VIDEO;