[FFmpeg-devel,v3,1/3] lavc/avs2_parser.c: fix for missing start code

Submitted by hwren on July 12, 2019, 3:21 p.m.

Details

Message ID 1562944894-29396-2-git-send-email-hwrenx@126.com
State New
Headers show

Commit Message

hwren July 12, 2019, 3:21 p.m.
Signed-off-by: hwrenx <hwrenx@126.com>
---
 libavcodec/avs2_parser.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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)
 {