1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

ensure that the codec_id detection in av_find_stream_info() does not

destroy the first dts values

Originally committed as revision 9965 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2007-08-06 21:14:29 +00:00
parent b43387d447
commit c7385375bc

View File

@ -1970,11 +1970,20 @@ int av_find_stream_info(AVFormatContext *ic)
for(i=0;i<ic->nb_streams;i++) {
st = ic->streams[i];
if (codec_identified[st->index]) {
av_read_frame_flush(ic);
av_seek_frame(ic, st->index, 0.0, 0);
url_fseek(&ic->pb, ic->data_offset, SEEK_SET);
if (codec_identified[st->index])
break;
}
//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