diff mbox

[FFmpeg-devel] cbs_av1, cbs_jpeg, cbs_mpeg2, cbs_vp9: Fix undef

Message ID 20190607002711.62880-1-andreas.rheinhardt@gmail.com
State Accepted
Commit ad2745e86763c72b8580429e8e345196a4be27bc
Headers show

Commit Message

Andreas Rheinhardt June 7, 2019, 12:27 a.m. UTC
READ has already been undefined at this point; it is obviously intended
to undef WRITE.
Furthermore, leb128 (in cbs_av1) was undefined too often and
inconsistently.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/cbs_av1.c   | 5 ++---
 libavcodec/cbs_jpeg.c  | 2 +-
 libavcodec/cbs_mpeg2.c | 2 +-
 libavcodec/cbs_vp9.c   | 2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

Comments

Mark Thompson June 7, 2019, 8:27 p.m. UTC | #1
On 07/06/2019 01:27, Andreas Rheinhardt wrote:
> READ has already been undefined at this point; it is obviously intended
> to undef WRITE.
> Furthermore, leb128 (in cbs_av1) was undefined too often and
> inconsistently.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/cbs_av1.c   | 5 ++---
>  libavcodec/cbs_jpeg.c  | 2 +-
>  libavcodec/cbs_mpeg2.c | 2 +-
>  libavcodec/cbs_vp9.c   | 2 +-
>  4 files changed, 5 insertions(+), 6 deletions(-)

Yep; applied.

Thanks!

- Mark
diff mbox

Patch

diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c
index eb2d03ef43..eb6b801790 100644
--- a/libavcodec/cbs_av1.c
+++ b/libavcodec/cbs_av1.c
@@ -648,7 +648,6 @@  static size_t cbs_av1_get_payload_bytes_left(GetBitContext *gbc)
 #undef xf
 #undef xsu
 #undef uvlc
-#undef leb128
 #undef ns
 #undef increment
 #undef subexp
@@ -720,17 +719,17 @@  static size_t cbs_av1_get_payload_bytes_left(GetBitContext *gbc)
 
 #include "cbs_av1_syntax_template.c"
 
-#undef READ
+#undef WRITE
 #undef READWRITE
 #undef RWContext
 #undef xf
 #undef xsu
 #undef uvlc
-#undef leb128
 #undef ns
 #undef increment
 #undef subexp
 #undef delta_q
+#undef leb128
 #undef infer
 #undef byte_alignment
 
diff --git a/libavcodec/cbs_jpeg.c b/libavcodec/cbs_jpeg.c
index 5a72f0e2e7..83857bbba2 100644
--- a/libavcodec/cbs_jpeg.c
+++ b/libavcodec/cbs_jpeg.c
@@ -75,7 +75,7 @@ 
 
 #include "cbs_jpeg_syntax_template.c"
 
-#undef READ
+#undef WRITE
 #undef READWRITE
 #undef RWContext
 #undef FUNC
diff --git a/libavcodec/cbs_mpeg2.c b/libavcodec/cbs_mpeg2.c
index ce22e32c15..cb202f835b 100644
--- a/libavcodec/cbs_mpeg2.c
+++ b/libavcodec/cbs_mpeg2.c
@@ -118,7 +118,7 @@ 
 
 #include "cbs_mpeg2_syntax_template.c"
 
-#undef READ
+#undef WRITE
 #undef READWRITE
 #undef RWContext
 #undef xui
diff --git a/libavcodec/cbs_vp9.c b/libavcodec/cbs_vp9.c
index 0b5f137ed8..5579d9b0af 100644
--- a/libavcodec/cbs_vp9.c
+++ b/libavcodec/cbs_vp9.c
@@ -395,7 +395,7 @@  static int cbs_vp9_write_le(CodedBitstreamContext *ctx, PutBitContext *pbc,
 
 #include "cbs_vp9_syntax_template.c"
 
-#undef READ
+#undef WRITE
 #undef READWRITE
 #undef RWContext
 #undef xf