diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 395ae1c503..bb3c876c98 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -7133,6 +7133,13 @@ static int find_frame_end(H264Context *h, const uint8_t *buf, int buf_size){ } pc->frame_start_found = 1; } + if((state&0xFFFFFF1F) == 0x107 || (state&0xFFFFFF1F) == 0x108 || (state&0xFFFFFF1F) == 0x109){ + if(pc->frame_start_found){ + pc->state=-1; + pc->frame_start_found= 0; + return i-4; + } + } if (i4 && buf[i-5]==0) i--; + return i-4; + } + } + if (is; AVCodecContext * const avctx= s->avctx; @@ -7709,6 +7741,7 @@ AVCodecParser h264_parser = { NULL, h264_parse, ff_parse_close, + h264_split, }; #include "svq3.c"