diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-10 10:54:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-10 11:22:28 +0200 |
commit | dd0429e1de54a6f583384cde010967cad7c10688 (patch) | |
tree | a45a2f73f3b6f5dcefc0ae9efdb7a6203c142e46 /libavformat | |
parent | c589c4c52d130ab07d0b183db129adcc3bb7d39c (diff) | |
parent | 756547ce7f4d67a18663503e2157aebed3531703 (diff) |
Merge commit '756547ce7f4d67a18663503e2157aebed3531703'
* commit '756547ce7f4d67a18663503e2157aebed3531703':
avi: DV in AVI must be considered single stream
Conflicts:
libavformat/avidec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/avidec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 3bdd80bf5d..60375394d7 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1045,7 +1045,7 @@ start_sync: goto start_sync; } - n = get_stream_idx(d); + n = avi->dv_demux ? 0 : get_stream_idx(d); if (!((i - avi->last_pkt_pos) & 1) && get_stream_idx(d + 1) < s->nb_streams) @@ -1585,6 +1585,12 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t pos, pos_min; AVIStream *ast; + /* Does not matter which stream is requested dv in avi has the + * stream information in the first video stream. + */ + if (avi->dv_demux) + stream_index = 0; + if (!avi->index_loaded) { /* we only load the index on demand */ avi_load_index(s); @@ -1617,7 +1623,6 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, /* One and only one real stream for DV in AVI, and it has video */ /* offsets. Calling with other stream indexes should have failed */ /* the av_index_search_timestamp call above. */ - av_assert0(stream_index == 0); if (avio_seek(s->pb, pos, SEEK_SET) < 0) return -1; |