summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-31 20:32:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-31 20:55:02 +0100
commit343900a14777315fe31002334141a9d9616c6022 (patch)
treed5659064b8ee9c02b525bcbbbeadbaa09c202e13 /libavcodec
parent9e28e0035a1554a8048686fba67130b83e1cc13b (diff)
mpeg12: print error for invalid skip cases
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg12.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 8f028f3b5c..16f9a3d7ef 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -770,8 +770,10 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64])
mb_type = s->current_picture.f.mb_type[s->mb_x + s->mb_y * s->mb_stride - 1];
else
mb_type = s->current_picture.f.mb_type[s->mb_width + (s->mb_y - 1) * s->mb_stride - 1]; // FIXME not sure if this is allowed in MPEG at all
- if (IS_INTRA(mb_type))
+ if (IS_INTRA(mb_type)) {
+ av_log(s->avctx, AV_LOG_ERROR, "skip with previntra\n");
return -1;
+ }
s->current_picture.f.mb_type[s->mb_x + s->mb_y*s->mb_stride] =
mb_type | MB_TYPE_SKIP;
// av_assert2(s->current_picture.f.mb_type[s->mb_x + s->mb_y * s->mb_stride - 1] & (MB_TYPE_16x16 | MB_TYPE_16x8));