On Tue, Jul 30, 2013 at 06:25:41PM +0200, Vittorio Giovara wrote:
> --- a/libavcodec/h264_sei.c
> +++ b/libavcodec/h264_sei.c
> @@ -44,12 +44,14 @@ void ff_h264_reset_sei(H264Context *h) {
> h->sei_buffering_period_present = 0;
> }
You missed some code before here.
> +static int decode_picture_timing(H264Context *h)
> +{
> + if (h->sps.nal_hrd_parameters_present_flag ||
> + h->sps.vcl_hrd_parameters_present_flag) {
> h->sei_cpb_removal_delay = get_bits(&h->gb,
> h->sps.cpb_removal_delay_length);
> h->sei_dpb_output_delay = get_bits(&h->gb,
> h->sps.dpb_output_delay_length);
align
> @@ -59,80 +61,85 @@ static int decode_picture_timing(H264Context *h){
> - if(h->sps.time_offset_length > 0)
> + if (h->sps.time_offset_length > 0)
> skip_bits(&h->gb, h->sps.time_offset_length); /*
> time_offset */
Break this line.
> - if(h->avctx->debug & FF_DEBUG_PICT_INFO)
> + if (h->avctx->debug & FF_DEBUG_PICT_INFO)
> av_log(h->avctx, AV_LOG_DEBUG, "ct_type:%X pic_struct:%d\n",
> h->sei_ct_type, h->sei_pic_struct);
and this and other similarly long ones
> - user_data[i]= 0;
> - e= sscanf(user_data+16, "x264 - core %d"/*%s - H.264/MPEG-4 AVC codec -
> Copyleft 2005 - http://www.videolan.org/x264.html*/, &build);
> - if(e==1 && build>0)
> - h->x264_build= build;
> + user_data[i] = 0;
> + e = sscanf(user_data + 16, "x264 - core %d", &build);
> + if (e == 1 && build > 0)
> + h->x264_build = build;
.. and gone was the comment ..
> h->sei_recovery_frame_cnt = get_ue_golomb(&h->gb);
> - skip_bits(&h->gb, 4); /* 1b exact_match_flag, 1b broken_link_flag,
> 2b changing_slice_group_idc */
> + skip_bits(&h->gb, 4);
> + /* 1b exact_match_flag,
> + 1b broken_link_flag,
> + 2b changing_slice_group_idc */
Such comments must go above, not below the code.
> - if(sps_id > 31 || !h->sps_buffers[sps_id]) {
> + if (sps_id > 31 || !h->sps_buffers[sps_id]) {
> av_log(h->avctx, AV_LOG_ERROR, "non-existing SPS %d referenced in
> buffering period\n", sps_id);
another example long line
> @@ -156,39 +163,39 @@ static int decode_buffering_period(H264Context *h){
> //FIXME check bits here
space after //
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel