]> git.sesse.net Git - ffmpeg/commitdiff
avcodec: Constify AVCodecParserContext.parser
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 6 Mar 2021 23:10:12 +0000 (00:10 +0100)
committerJames Almer <jamrial@gmail.com>
Tue, 27 Apr 2021 13:43:15 +0000 (10:43 -0300)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
doc/APIchanges
libavcodec/avcodec.h
libavcodec/parser.c

index 9a29421446e3a8a75012f95ffba0b43c8a15a2bd..14dfb5890465790bc87b810874bec5f3e74a0910 100644 (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.
index 986e31b5aa0c624a572a324b8713d8adbcaf0038..51281bf1b6e4f8c8f759233fc2e3b670ebd2d401 100644 (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()) */
index 593ea9ddf71e19b3feb08053321a82bd67c95abe..f81a62d5920e2d8b4b39615417aa9db269a4d1be 100644 (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;