westwood_vqa: set video stream duration
authorPaul B Mahol <onemda@gmail.com>
Wed, 21 Mar 2012 00:04:50 +0000 (00:04 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 21 Mar 2012 17:09:27 +0000 (18:09 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/westwood_vqa.c

index 572045b..c3bd0df 100644 (file)
@@ -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;