diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-03-07 00:28:14 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-04-27 10:43:16 -0300 |
commit | e5af9203098a889f36b759652615046254d45102 (patch) | |
tree | 5b27c29186fc551d4d40669039fb49ab04224baf /libavcodec/h264_parser.c | |
parent | e625ae609206e0550ff733965c6f5447579320aa (diff) | |
download | ffmpeg-e5af9203098a889f36b759652615046254d45102.tar.gz |
avcodec: Move all AVCodecParser.split functions to remove_extradata_bsf
The remove_extradata bsf is the only user of these functions.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r-- | libavcodec/h264_parser.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 880ccb50fa..d3c56cc188 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, }; |