2013/11/4 Vittorio Giovara <[email protected]>
> ---
> libavcodec/h264_ps.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
> index 54b735d..819b7ff 100644
> --- a/libavcodec/h264_ps.c
> +++ b/libavcodec/h264_ps.c
> @@ -131,6 +131,9 @@ static inline int decode_hrd_parameters(H264Context
> *h, SPS *sps)
> static inline int decode_vui_parameters(H264Context *h, SPS *sps)
> {
> int aspect_ratio_info_present_flag;
> + int chroma_loc_info_present_flag;
> + int chroma_sample_loc_type_top_field;
> + int chroma_sample_loc_type_bottom_field;
> unsigned int aspect_ratio_idc;
>
> aspect_ratio_info_present_flag = get_bits1(&h->gb);
> @@ -173,11 +176,12 @@ static inline int decode_vui_parameters(H264Context
> *h, SPS *sps)
> }
> }
>
> - /* chroma_location_info_present_flag */
> - if (get_bits1(&h->gb)) {
> - /* chroma_sample_location_type_top_field */
> - h->avctx->chroma_sample_location = get_ue_golomb(&h->gb) + 1;
> - get_ue_golomb(&h->gb); /*
> chroma_sample_location_type_bottom_field */
> + chroma_loc_info_present_flag = get_bits1(&h->gb);
> + if (chroma_loc_info_present_flag) {
> + chroma_sample_loc_type_top_field = get_ue_golomb(&h->gb);
> + chroma_sample_loc_type_bottom_field = get_ue_golomb(&h->gb);
> +
> + h->avctx->chroma_sample_location =
> chroma_sample_loc_type_top_field + 1;
> }
>
> sps->timing_info_present_flag = get_bits1(&h->gb);
> --
> 1.7.9.5
>
> _______________________________________________
> libav-devel mailing list
> [email protected]
> https://lists.libav.org/mailman/listinfo/libav-devel
>
Put the declaration of chroma_sample_loc_type_{top|bottom}_field into the
inside of the if (chroma_loc_info_present_flag) branch.
The two patches could be squashed, IMHO.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel