[FFmpeg-cvslog] cavsdec: Make sure a sequence header has been decoded before decoding pictures
Martin Storsjö
git at videolan.org
Thu Jan 16 21:57:38 CET 2014
ffmpeg | branch: release/0.10 | Martin Storsjö <martin at martin.st> | Thu Sep 12 11:58:25 2013 +0300| [7f80928c0e7a74dff58d6c9b0172e34619844d01] | committer: Luca Barbato
cavsdec: Make sure a sequence header has been decoded before decoding pictures
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit e90a6846c2c006fbebd00e1f2789f4a86fafacef)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
Conflicts:
libavcodec/cavsdec.c
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7f80928c0e7a74dff58d6c9b0172e34619844d01
---
libavcodec/cavsdec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 1dd237a..5582fd4 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -467,6 +467,11 @@ static int decode_pic(AVSContext *h) {
int skip_count = -1;
enum cavs_mb mb_type;
+ if (!h->top_qp) {
+ av_log(h, AV_LOG_ERROR, "No sequence header decoded yet\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (!s->context_initialized) {
s->avctx->idct_algo = FF_IDCT_CAVS;
if (MPV_common_init(s) < 0)
More information about the ffmpeg-cvslog
mailing list