avi: DV in AVI must be considered single stream
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:

committed by
Sean McGovern

parent
4b24eb1a03
commit
3485a07977
@@ -887,7 +887,7 @@ start_sync:
|
|||||||
goto 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)
|
if(!((i-avi->last_pkt_pos)&1) && get_stream_idx(d+1) < s->nb_streams)
|
||||||
continue;
|
continue;
|
||||||
@@ -1291,12 +1291,17 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
|
|||||||
int64_t pos;
|
int64_t pos;
|
||||||
AVIStream *ast;
|
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) {
|
if (!avi->index_loaded) {
|
||||||
/* we only load the index on demand */
|
/* we only load the index on demand */
|
||||||
avi_load_index(s);
|
avi_load_index(s);
|
||||||
avi->index_loaded = 1;
|
avi->index_loaded = 1;
|
||||||
}
|
}
|
||||||
assert(stream_index>= 0);
|
|
||||||
|
|
||||||
st = s->streams[stream_index];
|
st = s->streams[stream_index];
|
||||||
ast= st->priv_data;
|
ast= st->priv_data;
|
||||||
@@ -1315,7 +1320,6 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
|
|||||||
/* One and only one real stream for DV in AVI, and it has video */
|
/* One and only one real stream for DV in AVI, and it has video */
|
||||||
/* offsets. Calling with other stream indexes should have failed */
|
/* offsets. Calling with other stream indexes should have failed */
|
||||||
/* the av_index_search_timestamp call above. */
|
/* the av_index_search_timestamp call above. */
|
||||||
assert(stream_index == 0);
|
|
||||||
|
|
||||||
/* Feed the DV video stream version of the timestamp to the */
|
/* Feed the DV video stream version of the timestamp to the */
|
||||||
/* DV demux so it can synthesize correct timestamps. */
|
/* DV demux so it can synthesize correct timestamps. */
|
||||||
|
Reference in New Issue
Block a user