summaryrefslogtreecommitdiff
path: root/libavcodec/h264_sei.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-23 19:41:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-23 19:41:46 +0200
commit068d0b4e2503649cbf35524466e96f17f45327fa (patch)
tree862d6b4fb841a1330a54251057891883ae4893cd /libavcodec/h264_sei.c
parent1e43786b4c60b0eb52d2a500987fc0395016e362 (diff)
h264: some fields in SEIs are longer than 25 bits thus use get_bits_long()
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_sei.c')
-rw-r--r--libavcodec/h264_sei.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
index 0e6fde22df..0d0d88e4a3 100644
--- a/libavcodec/h264_sei.c
+++ b/libavcodec/h264_sei.c
@@ -47,8 +47,8 @@ void ff_h264_reset_sei(H264Context *h) {
static int decode_picture_timing(H264Context *h){
MpegEncContext * const s = &h->s;
if(h->sps.nal_hrd_parameters_present_flag || h->sps.vcl_hrd_parameters_present_flag){
- h->sei_cpb_removal_delay = get_bits(&s->gb, h->sps.cpb_removal_delay_length);
- h->sei_dpb_output_delay = get_bits(&s->gb, h->sps.dpb_output_delay_length);
+ h->sei_cpb_removal_delay = get_bits_long(&s->gb, h->sps.cpb_removal_delay_length);
+ h->sei_dpb_output_delay = get_bits_long(&s->gb, h->sps.dpb_output_delay_length);
}
if(h->sps.pic_struct_present_flag){
unsigned int i, num_clock_ts;
@@ -146,13 +146,13 @@ static int decode_buffering_period(H264Context *h){
// NOTE: This is really so duplicated in the standard... See H.264, D.1.1
if (sps->nal_hrd_parameters_present_flag) {
for (sched_sel_idx = 0; sched_sel_idx < sps->cpb_cnt; sched_sel_idx++) {
- h->initial_cpb_removal_delay[sched_sel_idx] = get_bits(&s->gb, sps->initial_cpb_removal_delay_length);
+ h->initial_cpb_removal_delay[sched_sel_idx] = get_bits_long(&s->gb, sps->initial_cpb_removal_delay_length);
skip_bits(&s->gb, sps->initial_cpb_removal_delay_length); // initial_cpb_removal_delay_offset
}
}
if (sps->vcl_hrd_parameters_present_flag) {
for (sched_sel_idx = 0; sched_sel_idx < sps->cpb_cnt; sched_sel_idx++) {
- h->initial_cpb_removal_delay[sched_sel_idx] = get_bits(&s->gb, sps->initial_cpb_removal_delay_length);
+ h->initial_cpb_removal_delay[sched_sel_idx] = get_bits_long(&s->gb, sps->initial_cpb_removal_delay_length);
skip_bits(&s->gb, sps->initial_cpb_removal_delay_length); // initial_cpb_removal_delay_offset
}
}