mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
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>
This commit is contained in:
parent
592a9e57d9
commit
b7eee211bc
2 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue