[FFmpeg-cvslog] r9965 - trunk/libavformat/utils.c
michael
subversion
Mon Aug 6 23:14:29 CEST 2007
Author: michael
Date: Mon Aug 6 23:14:29 2007
New Revision: 9965
Log:
ensure that the codec_id detection in av_find_stream_info() does not
destroy the first dts values
Modified:
trunk/libavformat/utils.c
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c (original)
+++ trunk/libavformat/utils.c Mon Aug 6 23:14:29 2007
@@ -1970,11 +1970,20 @@ int av_find_stream_info(AVFormatContext
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
More information about the ffmpeg-cvslog
mailing list