[FFmpeg-cvslog] cbs_av1: Fix header writing when already aligned

Mark Thompson git at videolan.org
Tue Nov 6 01:17:32 EET 2018


ffmpeg | branch: release/4.1 | Mark Thompson <sw at jkqxz.net> | Sun Nov  4 23:56:39 2018 +0000| [af3fccfeff74da54fc3e702fbb6757c2aad2814e] | committer: Mark Thompson

cbs_av1: Fix header writing when already aligned

(cherry picked from commit 6bdb7712ae0267ba4f69c7434d2b3dee12762d1d)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af3fccfeff74da54fc3e702fbb6757c2aad2814e
---

 libavcodec/cbs_av1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c
index 9bac9dde09..1c49d90f51 100644
--- a/libavcodec/cbs_av1.c
+++ b/libavcodec/cbs_av1.c
@@ -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;



More information about the ffmpeg-cvslog mailing list