summaryrefslogtreecommitdiff
path: root/libavformat/mxf.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-10-02 13:22:51 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-10-02 13:22:51 +0000
commit03da8726f6732ac90c0cf585158135d221518e23 (patch)
tree439a0460577700380266d297ef4694ef1cedbf61 /libavformat/mxf.c
parent4109400295516181a7fe2c0327b4765fdb1f29f7 (diff)
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
Diffstat (limited to 'libavformat/mxf.c')
-rw-r--r--libavformat/mxf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mxf.c b/libavformat/mxf.c
index 2d673916ca..d0fb2f0d94 100644
--- a/libavformat/mxf.c
+++ b/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)))
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)