aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-20 15:08:18 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-20 15:09:26 +0100
commit88b4c1a7316cf47f68bf04accf613375b7326992 (patch)
treea8d10a3f6da6d0cf0376013624d8cf16c0165c66
parente39f8fad321fb1e0bc34dc223f915c2a17edacf1 (diff)
downloadffmpeg-88b4c1a7316cf47f68bf04accf613375b7326992.tar.gz
avcodec/mpeg12dec: Print error/warning messages on issues in mpeg1_decode_sequence()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpeg12dec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index baa8e81ad2..34dbebf68e 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2121,11 +2121,15 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
return -1;
}
s->frame_rate_index = get_bits(&s->gb, 4);
- if (s->frame_rate_index == 0 || s->frame_rate_index > 13)
+ if (s->frame_rate_index == 0 || s->frame_rate_index > 13) {
+ av_log(avctx, AV_LOG_WARNING, "frame_rate_index %d is invalid\n", s->frame_rate_index);
return -1;
+ }
s->bit_rate = get_bits(&s->gb, 18) * 400;
- if (get_bits1(&s->gb) == 0) /* marker */
+ if (get_bits1(&s->gb) == 0) { /* marker */
+ av_log(avctx, AV_LOG_ERROR, "Marker in sequence header missing\n");
return -1;
+ }
s->width = width;
s->height = height;