[FFmpeg-cvslog] smjpegdec: set nb_frames for video stream
Paul B Mahol
git at videolan.org
Fri Nov 2 17:49:14 CET 2012
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Nov 2 16:21:17 2012 +0000| [c39fb308162020ee82310613bf88271c1417d226] | committer: Paul B Mahol
smjpegdec: set nb_frames for video stream
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c39fb308162020ee82310613bf88271c1417d226
---
libavformat/smjpegdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/smjpegdec.c b/libavformat/smjpegdec.c
index 0cd993f..ceb29c9 100644
--- a/libavformat/smjpegdec.c
+++ b/libavformat/smjpegdec.c
@@ -106,10 +106,10 @@ static int smjpeg_read_header(AVFormatContext *s)
hlength = avio_rb32(pb);
if (hlength < 12)
return AVERROR_INVALIDDATA;
- avio_skip(pb, 4); // number of frames
vst = avformat_new_stream(s, 0);
if (!vst)
return AVERROR(ENOMEM);
+ vst->nb_frames = avio_rb32(pb);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->width = avio_rb16(pb);
vst->codec->height = avio_rb16(pb);
More information about the ffmpeg-cvslog
mailing list