Merge remote-tracking branch 'qatar/master'
[ffmpeg.git] / libavcodec / hevc_sei.c
index af8cb7d..2804ef1 100644 (file)
@@ -52,14 +52,14 @@ static void decode_nal_sei_decoded_picture_hash(HEVCContext *s)
 static void decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
 {
     GetBitContext *gb = &s->HEVClc->gb;
-    int cancel, type, quincunx;
+    int cancel, type, quincunx, content;
 
     get_ue_golomb(gb);                  // frame_packing_arrangement_id
     cancel = get_bits1(gb);             // frame_packing_cancel_flag
     if (cancel == 0) {
         type     = get_bits(gb, 7);     // frame_packing_arrangement_type
         quincunx = get_bits1(gb);       // quincunx_sampling_flag
-        skip_bits(gb, 6);               // content_interpretation_type
+        content  = get_bits(gb, 6);     // content_interpretation_type
 
         // the following skips spatial_flipping_flag frame0_flipped_flag
         // field_views_flag current_frame_is_frame0_flag
@@ -72,6 +72,11 @@ static void decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
         skip_bits1(gb);         // frame_packing_arrangement_persistance_flag
     }
     skip_bits1(gb);             // upsampled_aspect_ratio_flag
+
+    s->sei_frame_packing_present      = (cancel == 0);
+    s->frame_packing_arrangement_type = type;
+    s->content_interpretation_type    = content;
+    s->quincunx_subsampling           = quincunx;
 }
 
 static int decode_pic_timing(HEVCContext *s)