diff options
author | Zhao Zhili <quinkblack@foxmail.com> | 2022-06-13 11:36:33 +0800 |
---|---|---|
committer | Zhao Zhili <zhilizhao@tencent.com> | 2022-06-24 15:37:23 +0800 |
commit | b7eee211bc4c7897b538fb53d3ba9fad3a0b6832 (patch) | |
tree | 39a8826ef493d44b9598358298edf59dd77fc8c7 /libavcodec/avs2_parser.c | |
parent | 592a9e57d9aa4540c7bcdbbed315338990164f2f (diff) | |
download | ffmpeg-b7eee211bc4c7897b538fb53d3ba9fad3a0b6832.tar.gz |
avcodec/avs2_parser: split data into frames
Before the patch, the parser split data into units, not frames.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Diffstat (limited to 'libavcodec/avs2_parser.c')
-rw-r--r-- | libavcodec/avs2_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/avs2_parser.c b/libavcodec/avs2_parser.c index 3755dbd78c..71cf442903 100644 --- a/libavcodec/avs2_parser.c +++ b/libavcodec/avs2_parser.c @@ -31,7 +31,7 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz if (!pic_found) { for (; cur < buf_size; ++cur) { state = (state << 8) | buf[cur]; - if (AVS2_ISUNIT(buf[cur])){ + if ((state & 0xFFFFFF00) == 0x100 && AVS2_ISPIC(buf[cur])) { cur++; pic_found = 1; break; @@ -44,7 +44,7 @@ static int avs2_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_siz return END_NOT_FOUND; for (; cur < buf_size; cur++) { state = (state << 8) | buf[cur]; - if ((state & 0xFFFFFF00) == 0x100 && state > AVS2_SLICE_MAX_START_CODE) { + if ((state & 0xFFFFFF00) == 0x100 && AVS2_ISUNIT(buf[cur])) { pc->frame_start_found = 0; pc->state = -1; return cur - 3; |