From 5ca595facb9c0591c526903d1d836932fc86b80c Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 21 Mar 2012 00:04:50 +0000 Subject: westwood_vqa: set video stream duration Signed-off-by: Paul B Mahol Signed-off-by: Michael Niedermayer --- libavformat/westwood_vqa.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat') diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c index 572045be2f..c3bd0df6a9 100644 --- a/libavformat/westwood_vqa.c +++ b/libavformat/westwood_vqa.c @@ -112,6 +112,8 @@ static int wsvqa_read_header(AVFormatContext *s) st->codec->width = AV_RL16(&header[6]); st->codec->height = AV_RL16(&header[8]); fps = header[12]; + st->nb_frames = + st->duration = AV_RL16(&header[4]); if (fps < 1 || fps > 30) { av_log(s, AV_LOG_ERROR, "invalid fps: %d\n", fps); return AVERROR_INVALIDDATA; -- cgit v1.2.3