X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fh264_parser.c;h=d3c56cc18855a8c55e6df7144b3dba7515f8bb7d;hb=e5af9203098a889f36b759652615046254d45102;hp=880ccb50fa79394b0899fba84452cb04bfabd411;hpb=e625ae609206e0550ff733965c6f5447579320aa;p=ffmpeg diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 880ccb50fa7..d3c56cc1885 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -644,43 +644,6 @@ static int h264_parse(AVCodecParserContext *s, return next; } -static int h264_split(AVCodecContext *avctx, - const uint8_t *buf, int buf_size) -{ - uint32_t state = -1; - int has_sps = 0; - int has_pps = 0; - const uint8_t *ptr = buf, *end = buf + buf_size; - int nalu_type; - - while (ptr < end) { - ptr = avpriv_find_start_code(ptr, end, &state); - if ((state & 0xFFFFFF00) != 0x100) - break; - nalu_type = state & 0x1F; - if (nalu_type == H264_NAL_SPS) { - has_sps = 1; - } else if (nalu_type == H264_NAL_PPS) - has_pps = 1; - /* else if (nalu_type == 0x01 || - * nalu_type == 0x02 || - * nalu_type == 0x05) { - * } - */ - else if ((nalu_type != H264_NAL_SEI || has_pps) && - nalu_type != H264_NAL_AUD && nalu_type != H264_NAL_SPS_EXT && - nalu_type != 0x0f) { - if (has_sps) { - while (ptr - 4 > buf && ptr[-5] == 0) - ptr--; - return ptr - 4 - buf; - } - } - } - - return 0; -} - static void h264_close(AVCodecParserContext *s) { H264ParseContext *p = s->priv_data; @@ -708,5 +671,4 @@ const AVCodecParser ff_h264_parser = { .parser_init = init, .parser_parse = h264_parse, .parser_close = h264_close, - .split = h264_split, };