diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2006-07-28 13:31:08 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2006-07-28 13:31:08 +0000 |
commit | 7c87a2f0c058472c39ba3670f8164acdd6baf2d2 (patch) | |
tree | 09e7b790ac34eda66e17c89b258375c2bbc966b3 /libavformat/mxf.c | |
parent | 6979600818329be76d8ac6c292e8358e49e2e729 (diff) | |
download | ffmpeg-7c87a2f0c058472c39ba3670f8164acdd6baf2d2.tar.gz |
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.
Originally committed as revision 5835 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mxf.c')
-rw-r--r-- | libavformat/mxf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mxf.c b/libavformat/mxf.c index 2515e84bf2..c0b2099781 100644 --- a/libavformat/mxf.c +++ b/libavformat/mxf.c @@ -215,7 +215,7 @@ static int mxf_read_metadata_sequence(MXFContext *mxf, KLVPacket *klv) 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 @@ static int mxf_read_metadata_sequence(MXFContext *mxf, KLVPacket *klv) 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; |