Commit 30662b90 authored by michael's avatar michael

ensure that the codec_id detection in av_find_stream_info() does not

destroy the first dts values


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9965 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0f6928c0
...@@ -1970,11 +1970,20 @@ int av_find_stream_info(AVFormatContext *ic) ...@@ -1970,11 +1970,20 @@ int av_find_stream_info(AVFormatContext *ic)
for(i=0;i<ic->nb_streams;i++) { for(i=0;i<ic->nb_streams;i++) {
st = ic->streams[i]; st = ic->streams[i];
if (codec_identified[st->index]) { if (codec_identified[st->index])
av_read_frame_flush(ic); break;
av_seek_frame(ic, st->index, 0.0, 0); }
url_fseek(&ic->pb, ic->data_offset, SEEK_SET); //FIXME this is a mess
if(i!=ic->nb_streams){
av_read_frame_flush(ic);
for(i=0;i<ic->nb_streams;i++) {
st = ic->streams[i];
if (codec_identified[st->index]) {
av_seek_frame(ic, st->index, 0.0, 0);
}
st->cur_dts= st->first_dts;
} }
url_fseek(&ic->pb, ic->data_offset, SEEK_SET);
} }
#if 0 #if 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment