]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/nellymoserenc.c
latm: Always reconfigure if no extradata was set previously
[ffmpeg] / libavcodec / nellymoserenc.c
index 34a15e5a50d0d5ab77973bf7ee919647fa6a392d..fc803a2d5646cd2b540973eaa400afd2ec388acc 100644 (file)
@@ -40,7 +40,6 @@
 #include "nellymoser.h"
 #include "avcodec.h"
 #include "audio_frame_queue.h"
-#include "dsputil.h"
 #include "fft.h"
 #include "internal.h"
 #include "sinewin.h"
@@ -141,9 +140,6 @@ static av_cold int encode_end(AVCodecContext *avctx)
         av_free(s->path);
     }
     ff_af_queue_close(&s->afq);
-#if FF_API_OLD_ENCODE_AUDIO
-    av_freep(&avctx->coded_frame);
-#endif
 
     return 0;
 }
@@ -188,14 +184,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
         }
     }
 
-#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:
     encode_end(avctx);
@@ -418,6 +406,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
 
 AVCodec ff_nellymoser_encoder = {
     .name           = "nellymoser",
+    .long_name      = NULL_IF_CONFIG_SMALL("Nellymoser Asao"),
     .type           = AVMEDIA_TYPE_AUDIO,
     .id             = AV_CODEC_ID_NELLYMOSER,
     .priv_data_size = sizeof(NellyMoserEncodeContext),
@@ -425,7 +414,6 @@ AVCodec ff_nellymoser_encoder = {
     .encode2        = encode_frame,
     .close          = encode_end,
     .capabilities   = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY,
-    .long_name      = NULL_IF_CONFIG_SMALL("Nellymoser Asao"),
     .sample_fmts    = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
                                                      AV_SAMPLE_FMT_NONE },
 };