Commit 57c86cd6 authored by reimar's avatar reimar

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5835 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6f33d5ac
...@@ -215,7 +215,7 @@ static int mxf_read_metadata_sequence(MXFContext *mxf, KLVPacket *klv) ...@@ -215,7 +215,7 @@ static int mxf_read_metadata_sequence(MXFContext *mxf, KLVPacket *klv)
ByteIOContext *pb = &mxf->fc->pb; ByteIOContext *pb = &mxf->fc->pb;
uint8_t sequence_uid[16]; uint8_t sequence_uid[16];
uint8_t data_definition[16]; uint8_t data_definition[16];
uint64_t duration = 0; uint64_t duration = AV_NOPTS_VALUE;
int bytes_read = 0; int bytes_read = 0;
int i; int i;
...@@ -241,6 +241,7 @@ static int mxf_read_metadata_sequence(MXFContext *mxf, KLVPacket *klv) ...@@ -241,6 +241,7 @@ static int mxf_read_metadata_sequence(MXFContext *mxf, KLVPacket *klv)
for (i = 0; i < mxf->tracks_count; i++) for (i = 0; i < mxf->tracks_count; i++)
if (!memcmp(sequence_uid, mxf->tracks[i].sequence_uid, 16)) { if (!memcmp(sequence_uid, mxf->tracks[i].sequence_uid, 16)) {
mxf->tracks[i].stream->start_time = 0;
mxf->tracks[i].stream->duration = duration; mxf->tracks[i].stream->duration = duration;
if (data_definition[11] == 0x02 && data_definition[12] == 0x01) if (data_definition[11] == 0x02 && data_definition[12] == 0x01)
mxf->tracks[i].stream->codec->codec_type = CODEC_TYPE_VIDEO; mxf->tracks[i].stream->codec->codec_type = CODEC_TYPE_VIDEO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment