[FFmpeg-cvslog] r21620 - trunk/libavformat/avidec.c
michael
subversion
Wed Feb 3 01:35:10 CET 2010
Author: michael
Date: Wed Feb 3 01:35:10 2010
New Revision: 21620
Log:
Only set duration for streams where it is likely correct.
Fixes issue1120
Modified:
trunk/libavformat/avidec.c
Modified: trunk/libavformat/avidec.c
==============================================================================
--- trunk/libavformat/avidec.c Wed Feb 3 00:53:38 2010 (r21619)
+++ trunk/libavformat/avidec.c Wed Feb 3 01:35:10 2010 (r21620)
@@ -415,7 +415,6 @@ static int avi_read_header(AVFormatConte
st->nb_frames = get_le32(pb);
st->start_time = 0;
- st->duration = st->nb_frames;
get_le32(pb); /* buffer size */
get_le32(pb); /* quality */
ast->sample_size = get_le32(pb); /* sample ssize */
@@ -442,6 +441,8 @@ static int avi_read_header(AVFormatConte
av_log(s, AV_LOG_ERROR, "unknown stream type %X\n", tag1);
goto fail;
}
+ if(ast->sample_size == 0)
+ st->duration = st->nb_frames;
ast->frame_offset= ast->cum_len;
url_fskip(pb, size - 12 * 4);
break;
More information about the ffmpeg-cvslog
mailing list