]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ac3dec.c
Fix misspelled parameter names in Doxygen documentation.
[ffmpeg] / libavcodec / ac3dec.c
index 9b1aeeceaad282057f507b27a6f985c37f403d82..f2f6e5ce4d1ab4fe0c6de543a5219bfe9e13a457 100644 (file)
@@ -216,7 +216,7 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
     if (avctx->error_recognition >= FF_ER_CAREFUL) {
         s->input_buffer = av_mallocz(AC3_FRAME_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
         if (!s->input_buffer)
-            return AVERROR_NOMEM;
+            return AVERROR(ENOMEM);
     }
 
     avctx->sample_fmt = SAMPLE_FMT_S16;
@@ -1268,7 +1268,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
     }
 
     /* apply spectral extension to high frequency bins */
-    if (s->spx_in_use) {
+    if (s->spx_in_use && CONFIG_EAC3_DECODER) {
         ff_eac3_apply_spectral_extension(s);
     }
 
@@ -1420,7 +1420,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
         out_samples += 256 * s->out_channels;
     }
     *data_size = s->num_blocks * 256 * avctx->channels * sizeof (int16_t);
-    return s->frame_size;
+    return FFMIN(buf_size, s->frame_size);
 }
 
 /**