1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec: Constify AVCodecParserContext.parser

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2021-03-07 00:10:12 +01:00 committed by James Almer
parent a247ac640d
commit cb3ac722f4
3 changed files with 5 additions and 2 deletions

View File

@ -14,6 +14,9 @@ libavutil: 2017-10-21
API changes, most recent first:
2021-04-27 - xxxxxxxxxx - lavc yyyyyyyyy - avcodec.h
Constified AVCodecParserContext.parser.
2021-04-27 - xxxxxxxxxx - lavd yyyyyyyyy - avdevice.h
The av_*_device_next API functions now accept and return
pointers to const AVInputFormat resp. AVOutputFormat.

View File

@ -2877,7 +2877,7 @@ enum AVPictureStructure {
typedef struct AVCodecParserContext {
void *priv_data;
struct AVCodecParser *parser;
const struct AVCodecParser *parser;
int64_t frame_offset; /* offset of the current frame */
int64_t cur_offset; /* current offset
(incremented by each av_parser_parse()) */

View File

@ -55,7 +55,7 @@ found:
s = av_mallocz(sizeof(AVCodecParserContext));
if (!s)
goto err_out;
s->parser = (AVCodecParser*)parser;
s->parser = parser;
s->priv_data = av_mallocz(parser->priv_data_size);
if (!s->priv_data)
goto err_out;