1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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>
This commit is contained in:
Andreas Rheinhardt 2021-09-01 13:14:44 +02:00
parent 2bb9d2be5e
commit cbf111059d
4 changed files with 11 additions and 4 deletions

View File

@ -14,6 +14,9 @@ libavutil: 2021-04-27
API changes, most recent first:
2021-09-02 - xxxxxxxxxx - lavc 59.7.100 - avcodec.h
Incremented the number of elements of AVCodecParser.codec_ids to seven.
2021-08-24 - xxxxxxxxxx - lavc 59.6.100 - avcodec.h
Add FF_CODEC_PROPERTY_FILM_GRAIN

View File

@ -2927,7 +2927,7 @@ typedef struct AVCodecParserContext {
} AVCodecParserContext;
typedef struct AVCodecParser {
int codec_ids[5]; /* several codec IDs are permitted */
int codec_ids[7]; /* several codec IDs are permitted */
int priv_data_size;
int (*parser_init)(AVCodecParserContext *s);
/* This callback never returns an error, a negative value means that

View File

@ -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 =

View File

@ -28,7 +28,7 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 59
#define LIBAVCODEC_VERSION_MINOR 6
#define LIBAVCODEC_VERSION_MINOR 7
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \