1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

westwood_vqa: set video stream duration

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
Paul B Mahol 2012-03-20 22:26:41 +00:00 committed by Ronald S. Bultje
parent 98df2e2414
commit f0a343f399

View File

@ -109,6 +109,8 @@ static int wsvqa_read_header(AVFormatContext *s)
st->codec->width = AV_RL16(&header[6]); st->codec->width = AV_RL16(&header[6]);
st->codec->height = AV_RL16(&header[8]); st->codec->height = AV_RL16(&header[8]);
fps = header[12]; fps = header[12];
st->nb_frames =
st->duration = AV_RL16(&header[4]);
if (fps < 1 || fps > 30) { if (fps < 1 || fps > 30) {
av_log(s, AV_LOG_ERROR, "invalid fps: %d\n", fps); av_log(s, AV_LOG_ERROR, "invalid fps: %d\n", fps);
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;