Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-23 08:58:32 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-01-04 01:27:02 +0400
commited0dc01a47898e9d8ff0df7ae21d64ab81d6a8f4 (patch)
treeb932f4b627244dcffa2c58946e860be8a1e1583a /libavcodec
parent4a4e4b8139acf30bf57a8d5ad2fda2d68f6ad55f (diff)
h264: Decode short VUI without error
Fixes 47j9R7PXBep.mov Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit ae7a6441df26b5dd921af95677ec5e6dd35dc970) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264_ps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index f87957673d..5c21d80265 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -229,7 +229,8 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps){
if(sps->nal_hrd_parameters_present_flag || sps->vcl_hrd_parameters_present_flag)
get_bits1(&s->gb); /* low_delay_hrd_flag */
sps->pic_struct_present_flag = get_bits1(&s->gb);
-
+ if(!get_bits_left(&s->gb))
+ return 0;
sps->bitstream_restriction_flag = get_bits1(&s->gb);
if(sps->bitstream_restriction_flag){
get_bits1(&s->gb); /* motion_vectors_over_pic_boundaries_flag */