aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-01 13:14:44 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-02 19:02:35 +0200
commitcbf111059d2bbce6d1fe4a9c54323265b736a470 (patch)
tree5a65d0c0dc40a745c8f9b875245ef956c421ffaf
parent2bb9d2be5e2e1d971e5b80358098f2a7fce06e0e (diff)
downloadffmpeg-cbf111059d2bbce6d1fe4a9c54323265b736a470.tar.gz
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>
-rw-r--r--doc/APIchanges3
-rw-r--r--libavcodec/avcodec.h2
-rw-r--r--libavcodec/parser.c8
-rw-r--r--libavcodec/version.h2
4 files changed, 11 insertions, 4 deletions
diff --git a/doc/APIchanges b/doc/APIchanges
index 63bf95233f..d58272ebd4 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -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
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f3f401871b..ffd58c333f 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -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
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 =
diff --git a/libavcodec/version.h b/libavcodec/version.h
index d39329bc1d..7faf18a497 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -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, \