From: Zhao Zhili <zhiliz...@tencent.com> Use the next I/P/B or start code as the end of current frame.
Signed-off-by: Zhao Zhili <zhiliz...@tencent.com> --- libavcodec/cavs_parser.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libavcodec/cavs_parser.c b/libavcodec/cavs_parser.c index 03f392c2e5..4a03effd0f 100644 --- a/libavcodec/cavs_parser.c +++ b/libavcodec/cavs_parser.c @@ -59,12 +59,11 @@ static int cavs_find_frame_end(ParseContext *pc, const uint8_t *buf, return 0; for(; i<buf_size; i++){ state= (state<<8) | buf[i]; - if((state&0xFFFFFF00) == 0x100){ - if(state > SLICE_MAX_START_CODE){ - pc->frame_start_found=0; - pc->state=-1; - return i-3; - } + if (state == PIC_I_START_CODE || state == PIC_PB_START_CODE || + state == CAVS_START_CODE) { + pc->frame_start_found=0; + pc->state=-1; + return i-3; } } } -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".