]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/alacenc.c
h264: reset ref count if decoding the slice header fails
[ffmpeg] / libavcodec / alacenc.c
index 0143240588d572a1b64da14b1a5c3c12479f8565..401f26f66c34c40244a902a7d5fd1c6d73115706 100644 (file)
@@ -579,7 +579,7 @@ static av_cold int alac_encode_init(AVCodecContext *avctx)
         goto error;
     }
 
-    avctx->coded_frame = avcodec_alloc_frame();
+    avctx->coded_frame = av_frame_alloc();
     if (!avctx->coded_frame) {
         ret = AVERROR(ENOMEM);
         goto error;
@@ -643,6 +643,7 @@ static int alac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
 
 AVCodec ff_alac_encoder = {
     .name           = "alac",
+    .long_name      = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
     .type           = AVMEDIA_TYPE_AUDIO,
     .id             = AV_CODEC_ID_ALAC,
     .priv_data_size = sizeof(AlacEncodeContext),
@@ -654,5 +655,4 @@ AVCodec ff_alac_encoder = {
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
                                                      AV_SAMPLE_FMT_S16P,
                                                      AV_SAMPLE_FMT_NONE },
-    .long_name      = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
 };