[FFmpeg-devel] [PATCH v4 1/3] lavc/avs2_parser.c: fix missing start code

hwrenx hwrenx at 126.com
Mon Jul 22 07:23:36 EEST 2019


Signed-off-by: hwrenx <hwrenx at 126.com>
---
 libavcodec/avs2_parser.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/avs2_parser.c b/libavcodec/avs2_parser.c
index 1c9b342..dc2fa16 100644
--- a/libavcodec/avs2_parser.c
+++ b/libavcodec/avs2_parser.c
@@ -23,8 +23,10 @@
 
 #define SLICE_MAX_START_CODE    0x000001af
 
+#define ISSQH(x)  ((x) == 0xB0 )
+#define ISEND(x)  ((x) == 0xB1 )
 #define ISPIC(x)  ((x) == 0xB3 || (x) == 0xB6)
-#define ISUNIT(x) ((x) == 0xB0 || (x) == 0xB1 || (x) == 0xB2 || ISPIC(x))
+#define ISUNIT(x) ( ISSQH(x) || ISEND(x) || (x) == 0xB2 || ISPIC(x) || (x) == 0xB5 || (x) == 0xB7 )
 
 static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size)
 {
-- 
2.7.4



More information about the ffmpeg-devel mailing list