]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cbs_h264_syntax_template.c
avformat: remove avio_flush() calls from the end of write_packet functions
[ffmpeg] / libavcodec / cbs_h264_syntax_template.c
index cdacd79fc4e8e28b13cb42175e421d78d8d51e0b..878d348b948a53fd2600b49b55aae4d0fc0d17c0 100644 (file)
@@ -137,6 +137,10 @@ static int FUNC(vui_parameters)(CodedBitstreamContext *ctx, RWContext *rw,
             ub(8, colour_primaries);
             ub(8, transfer_characteristics);
             ub(8, matrix_coefficients);
+        } else {
+            infer(colour_primaries,         2);
+            infer(transfer_characteristics, 2);
+            infer(matrix_coefficients,      2);
         }
     } else {
         infer(video_format,             5);
@@ -650,7 +654,7 @@ static int FUNC(sei_pic_timing)(CodedBitstreamContext *ctx, RWContext *rw,
     }
 
     if (sps->vui.pic_struct_present_flag) {
-        static const int num_clock_ts[9] = {
+        static const uint8_t num_clock_ts[9] = {
             1, 1, 1, 2, 2, 3, 3, 2, 3
         };
         int i;
@@ -950,6 +954,7 @@ static int FUNC(sei)(CodedBitstreamContext *ctx, RWContext *rw,
         current->payload[k].payload_type = payload_type;
         current->payload[k].payload_size = payload_size;
 
+        current->payload_count++;
         CHECK(FUNC(sei_payload)(ctx, rw, &current->payload[k]));
 
         if (!cbs_h2645_read_more_rbsp_data(rw))
@@ -960,7 +965,6 @@ static int FUNC(sei)(CodedBitstreamContext *ctx, RWContext *rw,
                "SEI message: found %d.\n", k);
         return AVERROR_INVALIDDATA;
     }
-    current->payload_count = k + 1;
 #else
     for (k = 0; k < current->payload_count; k++) {
         PutBitContext start_state;