summaryrefslogtreecommitdiff
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-03-02 14:50:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-03-02 14:50:31 +0000
commitb72a2bc82f0ce8e4299b7ee049cdaecbe4888550 (patch)
tree2b0d051ccc8c329eba2d4de11a30b3700e2a1b9f /libavformat/avidec.c
parente84dab5f57acd210ed6b8dd4c044a278cfadee29 (diff)
dwstart support
Originally committed as revision 5097 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 1004c172ef..f491878189 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -35,7 +35,6 @@ typedef struct AVIStream {
int scale;
int rate;
int sample_size; /* size of one sample (or packet) (in the rate/scale sense) in bytes */
- int start;
int64_t cum_len; /* temporary storage (used during seek) */
@@ -313,7 +312,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
av_set_pts_info(st, 64, ast->scale, ast->rate);
- ast->start= get_le32(pb); /* start */
+ ast->cum_len=get_le32(pb); /* start */
nb_frames = get_le32(pb);
st->start_time = 0;
@@ -344,6 +343,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
av_log(s, AV_LOG_ERROR, "unknown stream type %X\n", tag1);
goto fail;
}
+ ast->frame_offset= ast->cum_len * FFMAX(ast->sample_size, 1);
url_fskip(pb, size - 12 * 4);
break;
case MKTAG('s', 't', 'r', 'f'):