summaryrefslogtreecommitdiff
path: root/libavcodec/libfdk-aacdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libfdk-aacdec.c')
-rw-r--r--libavcodec/libfdk-aacdec.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
index f789b75bfe..f7fc8119c2 100644
--- a/libavcodec/libfdk-aacdec.c
+++ b/libavcodec/libfdk-aacdec.c
@@ -2,7 +2,7 @@
* AAC decoder wrapper
* Copyright (c) 2012 Martin Storsjo
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -44,7 +44,7 @@ typedef struct FDKAACDecContext {
int initialized;
uint8_t *decoder_buffer;
uint8_t *anc_buffer;
- enum ConcealMethod conceal_method;
+ int conceal_method;
int drc_level;
int drc_boost;
int drc_heavy;
@@ -199,8 +199,8 @@ static av_cold int fdk_aac_decode_close(AVCodecContext *avctx)
if (s->handle)
aacDecoder_Close(s->handle);
- av_free(s->decoder_buffer);
- av_free(s->anc_buffer);
+ av_freep(&s->decoder_buffer);
+ av_freep(&s->anc_buffer);
return 0;
}
@@ -330,10 +330,8 @@ static int fdk_aac_decode_frame(AVCodecContext *avctx, void *data,
if (s->initialized) {
frame->nb_samples = avctx->frame_size;
- if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
- av_log(avctx, AV_LOG_ERROR, "ff_get_buffer() failed\n");
+ if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
return ret;
- }
if (s->anc_buffer) {
buf_size = DECODER_BUFFSIZE * DECODER_MAX_CHANNELS;
@@ -375,10 +373,8 @@ static int fdk_aac_decode_frame(AVCodecContext *avctx, void *data,
if (tmpptr) {
frame->nb_samples = avctx->frame_size;
- if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) {
- av_log(avctx, AV_LOG_ERROR, "ff_get_buffer() failed\n");
+ if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
goto end;
- }
}
if (s->decoder_buffer) {
memcpy(frame->extended_data[0], buf,