diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-10-01 17:41:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-01 17:59:27 +0200 |
commit | c9c7a776db3615b627dde75b9b9e3e786da43827 (patch) | |
tree | 3e658a318bf4416370ccc4b6507d4c74c072d72d /libavcodec/h264_ps.c | |
parent | fe70c1f45f108c73ebb9c23009e271a96336796f (diff) | |
download | ffmpeg-streaming-c9c7a776db3615b627dde75b9b9e3e786da43827.zip ffmpeg-streaming-c9c7a776db3615b627dde75b9b9e3e786da43827.tar.gz |
h264: try reading SPS with wrong escaping, it sometimes works better
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r-- | libavcodec/h264_ps.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index ba16e1c..36b18e9 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -228,7 +228,6 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps){ get_ue_golomb(&s->gb); /*max_dec_frame_buffering*/ if(s->gb.size_in_bits < get_bits_count(&s->gb)){ - av_log(h->s.avctx, AV_LOG_ERROR, "Overread VUI by %d bits\n", get_bits_count(&s->gb) - s->gb.size_in_bits); sps->num_reorder_frames=0; sps->bitstream_restriction_flag= 0; } @@ -238,6 +237,10 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps){ return -1; } } + if(s->gb.size_in_bits < get_bits_count(&s->gb)){ + av_log(h->s.avctx, AV_LOG_ERROR, "Overread VUI by %d bits\n", get_bits_count(&s->gb) - s->gb.size_in_bits); + return -1; + } return 0; } |