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
pull/126/head
Baptiste Coudurier 19 years ago
parent 4109400295
commit 03da8726f6
  1. 3
      libavformat/mxf.c

@ -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))) if (!memcmp(klv->key + sizeof(mxf_essence_element_key), track->track_number, sizeof(track->track_number)))
return i; 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) static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)

Loading…
Cancel
Save