]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/eac3enc.c
rv40: don't always do the full prev_type search
[ffmpeg] / libavcodec / eac3enc.c
index 75113b272f5d3f697fe0a9fcf6f586002bc8e880..409d581eda1b9c995025a1feeedc2c0eb48a3d0b 100644 (file)
@@ -99,7 +99,7 @@ void ff_eac3_set_cpl_states(AC3EncodeContext *s)
         for (ch = 1; ch <= s->fbw_channels; ch++) {
             if (block->channel_in_cpl[ch]) {
                 if (first_cpl_coords[ch]) {
-                    block->new_cpl_coords = 2;
+                    block->new_cpl_coords[ch] = 2;
                     first_cpl_coords[ch]  = 0;
                 }
             } else {
@@ -252,11 +252,13 @@ AVCodec ff_eac3_encoder = {
     .id              = CODEC_ID_EAC3,
     .priv_data_size  = sizeof(AC3EncodeContext),
     .init            = ff_ac3_encode_init,
-    .encode          = ff_ac3_float_encode_frame,
+    .encode2         = ff_ac3_float_encode_frame,
     .close           = ff_ac3_encode_close,
-    .sample_fmts     = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE},
+    .sample_fmts     = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
+                                                      AV_SAMPLE_FMT_NONE },
     .long_name       = NULL_IF_CONFIG_SMALL("ATSC A/52 E-AC-3"),
     .priv_class      = &eac3enc_class,
     .channel_layouts = ff_ac3_channel_layouts,
+    .defaults        = ac3_defaults,
 };
 #endif