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/av1_parser.c | |
parent | e625ae609206e0550ff733965c6f5447579320aa (diff) |
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/av1_parser.c')
-rw-r--r-- | libavcodec/av1_parser.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c index 578f5293c8..b6c8004ee3 100644 --- a/libavcodec/av1_parser.c +++ b/libavcodec/av1_parser.c @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "av1_parse.h" +#include "libavutil/avassert.h" #include "cbs.h" #include "cbs_av1.h" #include "internal.h" @@ -205,33 +205,10 @@ static void av1_parser_close(AVCodecParserContext *ctx) ff_cbs_close(&s->cbc); } -static int av1_parser_split(AVCodecContext *avctx, - const uint8_t *buf, int buf_size) -{ - AV1OBU obu; - const uint8_t *ptr = buf, *end = buf + buf_size; - - while (ptr < end) { - int len = ff_av1_extract_obu(&obu, ptr, buf_size, avctx); - if (len < 0) - break; - - if (obu.type == AV1_OBU_FRAME_HEADER || - obu.type == AV1_OBU_FRAME) { - return ptr - buf; - } - ptr += len; - buf_size -= len; - } - - return 0; -} - const AVCodecParser ff_av1_parser = { .codec_ids = { AV_CODEC_ID_AV1 }, .priv_data_size = sizeof(AV1ParseContext), .parser_init = av1_parser_init, .parser_close = av1_parser_close, .parser_parse = av1_parser_parse, - .split = av1_parser_split, }; |