From 2a42b680e993329e0aa4f8beac5c606d0df363f3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 22 Nov 2012 23:08:01 +0100 Subject: [PATCH] avidec: try to support oddly muxed MMES stream Fixes ticket1804 Signed-off-by: Michael Niedermayer (cherry picked from commit be89693ddc5a8cdeaf3edf48fb584d6adca54de0) --- libavformat/avidec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index cedce5d8ef..41e2e3c027 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1254,6 +1254,11 @@ static int avi_read_idx1(AVFormatContext *s, int size) avi->stream_index = -1; avio_seek(pb, idx1_pos, SEEK_SET); + if (s->nb_streams == 1 && s->streams[0]->codec->codec_tag == AV_RL32("MMES")){ + first_packet_pos = 0; + data_offset = avi->movi_list; + } + /* Read the entries and sort them in each stream component. */ for(i = 0; i < nb_index_entries; i++) { if(url_feof(pb))