diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-01-25 13:22:43 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-01-25 13:22:43 +0100 |
commit | a2a430024136fd947637ff56a4fea6a2689ca59d (patch) | |
tree | 8cab3177242814f02b1e49a51d81b5f2f1660621 /gst-libs | |
parent | 071c6e8f15f2afff7ca4ce5934c3bae1d76aea95 (diff) | |
parent | 8fb0beaf00aeae2ef6081d08f0d74d6e655a53da (diff) |
Merge branch 'master' into 0.11
Conflicts:
configure.ac
ext/kate/gstkateenc.c
gst/colorspace/colorspace.c
gst/mpegvideoparse/mpegvideoparse.c
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/codecparsers/gsth264parser.c | 16 | ||||
-rw-r--r-- | gst-libs/gst/codecparsers/gsth264parser.h | 2 | ||||
-rw-r--r-- | gst-libs/gst/video/gstbasevideoencoder.c | 2 |
3 files changed, 15 insertions, 5 deletions
diff --git a/gst-libs/gst/codecparsers/gsth264parser.c b/gst-libs/gst/codecparsers/gsth264parser.c index 6a164ecb1..b96965091 100644 --- a/gst-libs/gst/codecparsers/gsth264parser.c +++ b/gst-libs/gst/codecparsers/gsth264parser.c @@ -518,6 +518,7 @@ gst_h264_parse_hrd_parameters (GstH264HRDParams * hrd, NalReader * nr) for (sched_sel_idx = 0; sched_sel_idx <= hrd->cpb_cnt_minus1; sched_sel_idx++) { READ_UE (nr, hrd->bit_rate_value_minus1[sched_sel_idx]); READ_UE (nr, hrd->cpb_size_value_minus1[sched_sel_idx]); + READ_UINT8 (nr, hrd->cbr_flag[sched_sel_idx], 1); } READ_UINT8 (nr, hrd->initial_cpb_removal_delay_length_minus1, 5); @@ -747,22 +748,26 @@ slice_parse_ref_pic_list_modification_1 (GstH264SliceHdr * slice, NalReader * nr, guint list) { GstH264RefPicListModification *entries; - guint8 *ref_pic_list_modification_flag; + guint8 *ref_pic_list_modification_flag, *n_ref_pic_list_modification; guint32 modification_of_pic_nums_idc; guint i = 0; if (list == 0) { entries = slice->ref_pic_list_modification_l0; ref_pic_list_modification_flag = &slice->ref_pic_list_modification_flag_l0; + n_ref_pic_list_modification = &slice->n_ref_pic_list_modification_l0; } else { entries = slice->ref_pic_list_modification_l1; ref_pic_list_modification_flag = &slice->ref_pic_list_modification_flag_l1; + n_ref_pic_list_modification = &slice->n_ref_pic_list_modification_l1; } READ_UINT8 (nr, *ref_pic_list_modification_flag, 1); if (*ref_pic_list_modification_flag) { - do { + while (1) { READ_UE (nr, modification_of_pic_nums_idc); + if (modification_of_pic_nums_idc == 3) + break; if (modification_of_pic_nums_idc == 0 || modification_of_pic_nums_idc == 1) { READ_UE_ALLOWED (nr, entries[i].value.abs_diff_pic_num_minus1, 0, @@ -770,9 +775,10 @@ slice_parse_ref_pic_list_modification_1 (GstH264SliceHdr * slice, } else if (modification_of_pic_nums_idc == 2) { READ_UE (nr, entries[i].value.long_term_pic_num); } - } while (modification_of_pic_nums_idc != 3); + entries[i++].modification_of_pic_nums_idc = modification_of_pic_nums_idc; + } } - + *n_ref_pic_list_modification = i; return TRUE; error: @@ -1050,6 +1056,8 @@ gst_h264_parse_clock_timestamp (GstH264ClockTimestamp * tim, if (time_offset_length > 0) READ_UINT32 (nr, tim->time_offset, time_offset_length); + return TRUE; + error: GST_WARNING ("error parsing \"Clock timestamp\""); return FALSE; diff --git a/gst-libs/gst/codecparsers/gsth264parser.h b/gst-libs/gst/codecparsers/gsth264parser.h index d58f1b07d..3c221560e 100644 --- a/gst-libs/gst/codecparsers/gsth264parser.h +++ b/gst-libs/gst/codecparsers/gsth264parser.h @@ -573,8 +573,10 @@ struct _GstH264SliceHdr guint8 num_ref_idx_l1_active_minus1; guint8 ref_pic_list_modification_flag_l0; + guint8 n_ref_pic_list_modification_l0; GstH264RefPicListModification ref_pic_list_modification_l0[32]; guint8 ref_pic_list_modification_flag_l1; + guint8 n_ref_pic_list_modification_l1; GstH264RefPicListModification ref_pic_list_modification_l1[32]; GstH264PredWeightTable pred_weight_table; diff --git a/gst-libs/gst/video/gstbasevideoencoder.c b/gst-libs/gst/video/gstbasevideoencoder.c index 8126c120f..5482e67c1 100644 --- a/gst-libs/gst/video/gstbasevideoencoder.c +++ b/gst-libs/gst/video/gstbasevideoencoder.c @@ -1132,7 +1132,7 @@ void gst_base_video_encoder_set_latency (GstBaseVideoEncoder * base_video_encoder, GstClockTime min_latency, GstClockTime max_latency) { - g_return_if_fail (min_latency >= 0); + g_return_if_fail (GST_CLOCK_TIME_IS_VALID (min_latency)); g_return_if_fail (max_latency >= min_latency); GST_OBJECT_LOCK (base_video_encoder); |