diff mbox series

[FFmpeg-devel,48/57] avcodec/msmpeg4enc: Combine writing bits

Message ID GV1P250MB073703C0BB522E68F4323CF78FC02@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,01/57] avcodec/vc1: Combine identical checks | expand

Commit Message

Andreas Rheinhardt June 12, 2024, 1:48 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/msmpeg4enc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/msmpeg4enc.c b/libavcodec/msmpeg4enc.c
index 642a0ff100..3103a73663 100644
--- a/libavcodec/msmpeg4enc.c
+++ b/libavcodec/msmpeg4enc.c
@@ -71,8 +71,7 @@  void ff_msmpeg4_code012(PutBitContext *pb, int n)
     if (n == 0) {
         put_bits(pb, 1, 0);
     } else {
-        put_bits(pb, 1, 1);
-        put_bits(pb, 1, (n >= 2));
+        put_bits(pb, 2, 2 | (n >= 2));
     }
 }