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>2013-07-09 07:21:26 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-07-09 07:21:26 +0400
commit00b1401df6563e78c8616df4c62b8b5d6ac511a3 (patch)
tree2138b3c4b1ec9693cf692cb32896ae8fa7fc3997 /libavcodec/h264_ps.c
parent509642b4bd8411d3a6965e97cf7dacc3c45fe92a (diff)
avcodec/h264_ps: try to support Ambarella AVC
Fixes Ticket2763 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r--libavcodec/h264_ps.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index ea121ed12a..a4555455ac 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -224,6 +224,11 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps){
get_ue_golomb(&h->gb); /* chroma_sample_location_type_bottom_field */
}
+ if (show_bits1(&h->gb) && get_bits_left(&h->gb) < 10) {
+ av_log(h->avctx, AV_LOG_WARNING, "Truncated VUI\n");
+ return 0;
+ }
+
sps->timing_info_present_flag = get_bits1(&h->gb);
if(sps->timing_info_present_flag){
sps->num_units_in_tick = get_bits_long(&h->gb, 32);