diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-01 14:14:44 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-02 20:02:35 +0300 |
commit | cbf111059d2bbce6d1fe4a9c54323265b736a470 (patch) | |
tree | 5a65d0c0dc40a745c8f9b875245ef956c421ffaf /libavcodec/parser.c | |
parent | 2bb9d2be5e2e1d971e5b80358098f2a7fce06e0e (diff) |
avcodec/avcodec: Allow up to seven codec ids per parser
ff_pnm_parser and ff_vp3_parser already hit the current limit;
an addition to the former (to handle pfm) is planned.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/parser.c')
-rw-r--r-- | libavcodec/parser.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c index fc57246965..3b459cc125 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -46,7 +46,9 @@ AVCodecParserContext *av_parser_init(int codec_id) parser->codec_ids[1] == codec_id || parser->codec_ids[2] == codec_id || parser->codec_ids[3] == codec_id || - parser->codec_ids[4] == codec_id) + parser->codec_ids[4] == codec_id || + parser->codec_ids[5] == codec_id || + parser->codec_ids[6] == codec_id) goto found; } return NULL; @@ -127,7 +129,9 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, avctx->codec_id == s->parser->codec_ids[1] || avctx->codec_id == s->parser->codec_ids[2] || avctx->codec_id == s->parser->codec_ids[3] || - avctx->codec_id == s->parser->codec_ids[4]); + avctx->codec_id == s->parser->codec_ids[4] || + avctx->codec_id == s->parser->codec_ids[5] || + avctx->codec_id == s->parser->codec_ids[6]); if (!(s->flags & PARSER_FLAG_FETCHED_OFFSET)) { s->next_frame_offset = |