[libav-devel] [PATCH 2/2] h264_ps: Set AVCHROMA_LOC_UNSPECIFIED if chroma location info is absent.

Yusuke Nakamura muken.the.vfrmaniac at gmail.com
Sun Nov 3 20:15:02 CET 2013


---
 libavcodec/h264_ps.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 54b735d..a08ab3b 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -178,7 +178,8 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps)
         /* 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 */
-    }
+    } else
+        h->avctx->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED;
 
     sps->timing_info_present_flag = get_bits1(&h->gb);
     if (sps->timing_info_present_flag) {
-- 
1.8.3.msysgit.0



More information about the libav-devel mailing list