cbs_av1: Fix header writing when already aligned
authorMark Thompson <sw@jkqxz.net>
Sun, 4 Nov 2018 23:56:39 +0000 (23:56 +0000)
committerMark Thompson <sw@jkqxz.net>
Mon, 5 Nov 2018 23:00:58 +0000 (23:00 +0000)
libavcodec/cbs_av1.c

index 9bac9dd..1c49d90 100644 (file)
@@ -1179,7 +1179,7 @@ static int cbs_av1_write_obu(CodedBitstreamContext *ctx,
         if (err < 0)
             return err;
         end_pos = put_bits_count(pbc);
-        obu->obu_size = (end_pos - start_pos + 7) / 8;
+        obu->obu_size = header_size = (end_pos - start_pos + 7) / 8;
     } else {
         // Empty OBU.
         obu->obu_size = 0;