]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegaudioenc.c
lagarith: check count before writing zeros.
[ffmpeg] / libavcodec / mpegaudioenc.c
index bc44aed12d3323fc2cb77ae37e1e0025b93672e3..ab9e0fa54da3d4f4ca1a949354b8b466925ab1d9 100644 (file)
@@ -24,6 +24,8 @@
  * The simplest mpeg audio layer 2 encoder.
  */
 
+#include "libavutil/audioconvert.h"
+
 #include "avcodec.h"
 #include "internal.h"
 #include "put_bits.h"
@@ -32,6 +34,7 @@
 #define WFRAC_BITS  14   /* fractional bits for window */
 
 #include "mpegaudio.h"
+#include "mpegaudiodsp.h"
 
 /* currently, cannot change these constants (need to modify
    quantization stage) */
@@ -794,6 +797,9 @@ AVCodec ff_mp2_encoder = {
     .supported_samplerates = (const int[]){
         44100, 48000,  32000, 22050, 24000, 16000, 0
     },
+    .channel_layouts       = (const uint64_t[]){ AV_CH_LAYOUT_MONO,
+                                                 AV_CH_LAYOUT_STEREO,
+                                                 0 },
     .long_name             = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
     .defaults              = mp2_defaults,
 };