]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libfaad.c
mlpdec: Validate non-restart bit from the substream header.
[ffmpeg] / libavcodec / libfaad.c
index af97ca763f885fd1b748e0cb2ae1b16cf713986b..37468862377045661033ce9a7d80093442fdc7d3 100644 (file)
@@ -117,7 +117,7 @@ static void channel_setup(AVCodecContext *avctx)
 #endif
 }
 
-static int faac_init_mp4(AVCodecContext *avctx)
+static av_cold int faac_init_mp4(AVCodecContext *avctx)
 {
     FAACContext *s = avctx->priv_data;
     unsigned long samplerate;
@@ -318,20 +318,14 @@ static av_cold int faac_decode_init(AVCodecContext *avctx)
     return 0;
 }
 
-#define AAC_CODEC(id, name, long_name_) \
-AVCodec name ## _decoder = {    \
-    #name,                      \
-    CODEC_TYPE_AUDIO,           \
-    id,                         \
-    sizeof(FAACContext),        \
-    faac_decode_init,           \
-    NULL,                       \
-    faac_decode_end,            \
-    faac_decode_frame,          \
-    .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
-}
-
-// FIXME - raw AAC files - maybe just one entry will be enough
-AAC_CODEC(CODEC_ID_AAC, libfaad, "libfaad AAC (Advanced Audio Codec)");
-
-#undef AAC_CODEC
+AVCodec libfaad_decoder = {
+    "libfaad",
+    CODEC_TYPE_AUDIO,
+    CODEC_ID_AAC,
+    sizeof(FAACContext),
+    faac_decode_init,
+    NULL,
+    faac_decode_end,
+    faac_decode_frame,
+    .long_name = NULL_IF_CONFIG_SMALL("libfaad AAC (Advanced Audio Codec)"),
+};