]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mpegaudioenc.c
Use a variable instead of a repeated calculation when decoding AVUI.
[ffmpeg] / libavcodec / mpegaudioenc.c
index 38f440cfdbf4d073376ecb098ec06b5573c64af2..4dc050f3e8e4109ac104205c8c6d9f50eef3e288 100644 (file)
@@ -780,15 +780,18 @@ static const AVCodecDefault mp2_defaults[] = {
 };
 
 AVCodec ff_mp2_encoder = {
-    .name           = "mp2",
-    .type           = AVMEDIA_TYPE_AUDIO,
-    .id             = CODEC_ID_MP2,
-    .priv_data_size = sizeof(MpegAudioContext),
-    .init           = MPA_encode_init,
-    .encode2        = MPA_encode_frame,
-    .close          = MPA_encode_close,
-    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
-    .supported_samplerates= (const int[]){44100, 48000,  32000, 22050, 24000, 16000, 0},
-    .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
-    .defaults       = mp2_defaults,
+    .name                  = "mp2",
+    .type                  = AVMEDIA_TYPE_AUDIO,
+    .id                    = CODEC_ID_MP2,
+    .priv_data_size        = sizeof(MpegAudioContext),
+    .init                  = MPA_encode_init,
+    .encode2               = MPA_encode_frame,
+    .close                 = MPA_encode_close,
+    .sample_fmts           = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
+                                                            AV_SAMPLE_FMT_NONE },
+    .supported_samplerates = (const int[]){
+        44100, 48000,  32000, 22050, 24000, 16000, 0
+    },
+    .long_name             = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
+    .defaults              = mp2_defaults,
 };