OSDN Git Service

westwood_vqa: set video stream duration
authorPaul B Mahol <onemda@gmail.com>
Tue, 20 Mar 2012 22:26:41 +0000 (22:26 +0000)
committerRonald S. Bultje <rsbultje@gmail.com>
Tue, 27 Mar 2012 15:54:07 +0000 (08:54 -0700)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavformat/westwood_vqa.c

index c4e19a9..5e52e07 100644 (file)
@@ -109,6 +109,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;