diff options
author | James Almer <jamrial@gmail.com> | 2022-10-22 16:37:01 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-10-26 10:18:33 -0300 |
commit | 57117c0ef69edcd34e7ecb7fd75f363cad691c99 (patch) | |
tree | cd198879a2860d3fe325bd059dfb577bc5f63c5a /libavcodec/aac_ac3_parser.c | |
parent | b5abf6fdfc0d1bd8b009f8877589f1bc7eec3e9c (diff) | |
download | ffmpeg-57117c0ef69edcd34e7ecb7fd75f363cad691c99.tar.gz |
avcodec/aac_ac3_parser: don't try to sync when the parser is configured to handle complete frames
Should speed up parsing when the frames come from non raw containers.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/aac_ac3_parser.c')
-rw-r--r-- | libavcodec/aac_ac3_parser.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c index 6df064e28d..b2cb79801e 100644 --- a/libavcodec/aac_ac3_parser.c +++ b/libavcodec/aac_ac3_parser.c @@ -40,6 +40,10 @@ int ff_aac_ac3_parse(AVCodecParserContext *s1, int new_frame_start; int got_frame = 0; + if (s1->flags & PARSER_FLAG_COMPLETE_FRAMES) { + i = buf_size; + got_frame = 1; + } else { get_next: i=END_NOT_FOUND; if(s->remaining_size <= buf_size){ @@ -77,6 +81,7 @@ get_next: *poutbuf_size = 0; return buf_size; } + } *poutbuf = buf; *poutbuf_size = buf_size; |