[FFmpeg-cvslog] avcodec/mpeg12dec: do not fail on invalid frame_rate_index
Michael Niedermayer
git at videolan.org
Thu Nov 20 15:17:54 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Nov 20 15:09:42 2014 +0100| [0f8908aa1b66fbc8d62939ce8ee1ee04b856528f] | committer: Michael Niedermayer
avcodec/mpeg12dec: do not fail on invalid frame_rate_index
Fixes Ticket4073
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f8908aa1b66fbc8d62939ce8ee1ee04b856528f
---
libavcodec/mpeg12dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 34dbebf..36c993a 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -2123,7 +2123,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
s->frame_rate_index = get_bits(&s->gb, 4);
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->frame_rate_index = 1;
}
s->bit_rate = get_bits(&s->gb, 18) * 400;
if (get_bits1(&s->gb) == 0) { /* marker */
More information about the ffmpeg-cvslog
mailing list