]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libfaac.c
Move exp_strategy from AC3Block to AC3EncodeContext in order to arrange by
[ffmpeg] / libavcodec / libfaac.c
index 14e80112d23ae93cae680868b0f83759071625a9..b220b1714e4559818043788a53bb8b2b3334dff3 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file libfaac.c
+ * @file
  * Interface to libfaac for aac encoding.
  */
 
@@ -38,8 +38,10 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx)
     unsigned long samples_input, max_bytes_output;
 
     /* number of channels */
-    if (avctx->channels < 1 || avctx->channels > 6)
+    if (avctx->channels < 1 || avctx->channels > 6) {
+        av_log(avctx, AV_LOG_ERROR, "encoding %d channel(s) is not allowed\n", avctx->channels);
         return -1;
+    }
 
     s->faac_handle = faacEncOpen(avctx->sample_rate,
                                  avctx->channels,
@@ -145,10 +147,12 @@ static av_cold int Faac_encode_close(AVCodecContext *avctx)
 
 AVCodec libfaac_encoder = {
     "libfaac",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_AAC,
     sizeof(FaacAudioContext),
     Faac_encode_init,
     Faac_encode_frame,
-    Faac_encode_close
+    Faac_encode_close,
+    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
+    .long_name = NULL_IF_CONFIG_SMALL("libfaac AAC (Advanced Audio Codec)"),
 };