return 0 as stream index if only one stream, this is completely non standard, fix Cars_TL4IO6_239_DEXX_MPEG_TDC_072006.wav.mxf

Originally committed as revision 6528 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2006-10-02 13:22:51 +00:00
parent 4109400295
commit 03da8726f6
1 changed files with 2 additions and 1 deletions

View File

@ -214,7 +214,8 @@ static int mxf_get_stream_index(AVFormatContext *s, KLVPacket *klv)
if (!memcmp(klv->key + sizeof(mxf_essence_element_key), track->track_number, sizeof(track->track_number)))
return i;
}
return -1;
/* return 0 if only one stream, for OP Atom files with 0 as track number */
return s->nb_streams == 1 ? 0 : -1;
}
static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)