[FFmpeg-cvslog] avcodec/avcodec: Allow up to seven codec ids per parser
Andreas Rheinhardt
git at videolan.org
Thu Sep 2 20:27:55 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Sep 1 13:14:44 2021 +0200| [cbf111059d2bbce6d1fe4a9c54323265b736a470] | committer: Andreas Rheinhardt
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 at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbf111059d2bbce6d1fe4a9c54323265b736a470
---
doc/APIchanges | 3 +++
libavcodec/avcodec.h | 2 +-
libavcodec/parser.c | 8 ++++++--
libavcodec/version.h | 2 +-
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, \
More information about the ffmpeg-cvslog
mailing list