]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/roqaudioenc.c
hevc: templatize intra_pred
[ffmpeg] / libavcodec / roqaudioenc.c
index 3cc9931a333d67bdf340fc63d87a7d7a8f6526f0..f97d5d6e0ce1d59f4ef427a419dc1bafa090166c 100644 (file)
@@ -46,9 +46,6 @@ static av_cold int roq_dpcm_encode_close(AVCodecContext *avctx)
 {
     ROQDPCMContext *context = avctx->priv_data;
 
-#if FF_API_OLD_ENCODE_AUDIO
-    av_freep(&avctx->coded_frame);
-#endif
     av_freep(&context->frame_buffer);
 
     return 0;
@@ -81,14 +78,6 @@ static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
 
     context->lastSample[0] = context->lastSample[1] = 0;
 
-#if FF_API_OLD_ENCODE_AUDIO
-    avctx->coded_frame= avcodec_alloc_frame();
-    if (!avctx->coded_frame) {
-        ret = AVERROR(ENOMEM);
-        goto error;
-    }
-#endif
-
     return 0;
 error:
     roq_dpcm_encode_close(avctx);
@@ -204,6 +193,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
 
 AVCodec ff_roq_dpcm_encoder = {
     .name           = "roq_dpcm",
+    .long_name      = NULL_IF_CONFIG_SMALL("id RoQ DPCM"),
     .type           = AVMEDIA_TYPE_AUDIO,
     .id             = AV_CODEC_ID_ROQ_DPCM,
     .priv_data_size = sizeof(ROQDPCMContext),
@@ -213,5 +203,4 @@ AVCodec ff_roq_dpcm_encoder = {
     .capabilities   = CODEC_CAP_DELAY,
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
                                                      AV_SAMPLE_FMT_NONE },
-    .long_name      = NULL_IF_CONFIG_SMALL("id RoQ DPCM"),
 };