]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/hevcdec.c
avcodec: Constify AVCodecs
[ffmpeg] / libavcodec / hevcdec.c
index 9e41136aecfe02ed5a36d94481ce377a4f97e1ff..2d35b0b1824ab504d342ec883f2c86c185b037c5 100644 (file)
@@ -2639,7 +2639,7 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal)
         s->sList[i] = av_malloc(sizeof(HEVCContext));
         s->HEVClcList[i] = av_mallocz(sizeof(HEVCLocalContext));
         if (!s->sList[i] || !s->HEVClcList[i]) {
-            res = AVERROR_INVALIDDATA;
+            res = AVERROR(ENOMEM);
             goto error;
         }
         memcpy(s->sList[i], s, sizeof(HEVCContext));
@@ -3303,7 +3303,7 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output,
                              AVPacket *avpkt)
 {
     int ret;
-    int new_extradata_size;
+    size_t new_extradata_size;
     uint8_t *new_extradata;
     HEVCContext *s = avctx->priv_data;
 
@@ -3667,7 +3667,7 @@ static const AVClass hevc_decoder_class = {
     .version    = LIBAVUTIL_VERSION_INT,
 };
 
-AVCodec ff_hevc_decoder = {
+const AVCodec ff_hevc_decoder = {
     .name                  = "hevc",
     .long_name             = NULL_IF_CONFIG_SMALL("HEVC (High Efficiency Video Coding)"),
     .type                  = AVMEDIA_TYPE_VIDEO,