* TTA (The Lossless True Audio) decoder
* Copyright (c) 2006 Alex Beregszaszi
*
- * This file is part of FFmpeg.
+ * This file is part of Libav.
*
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
if (s->is_float)
{
- avctx->sample_fmt = SAMPLE_FMT_FLT;
- av_log(s->avctx, AV_LOG_ERROR, "Unsupported sample format. Please contact the developers.\n");
+ avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
+ av_log_ask_for_sample(s->avctx, "Unsupported sample format.\n");
return -1;
}
else switch(s->bps) {
-// case 1: avctx->sample_fmt = SAMPLE_FMT_U8; break;
- case 2: avctx->sample_fmt = SAMPLE_FMT_S16; break;
-// case 3: avctx->sample_fmt = SAMPLE_FMT_S24; break;
- case 4: avctx->sample_fmt = SAMPLE_FMT_S32; break;
+// case 1: avctx->sample_fmt = AV_SAMPLE_FMT_U8; break;
+ case 2: avctx->sample_fmt = AV_SAMPLE_FMT_S16; break;
+// case 3: avctx->sample_fmt = AV_SAMPLE_FMT_S24; break;
+ case 4: avctx->sample_fmt = AV_SAMPLE_FMT_S32; break;
default:
- av_log(s->avctx, AV_LOG_ERROR, "Invalid/unsupported sample format. Please contact the developers.\n");
+ av_log_ask_for_sample(s->avctx,
+ "Invalid/unsupported sample format.\n");
return -1;
}
static av_cold int tta_decode_close(AVCodecContext *avctx) {
TTAContext *s = avctx->priv_data;
- if (s->decode_buffer)
- av_free(s->decode_buffer);
+ av_free(s->decode_buffer);
av_freep(&s->ch_ctx);
return 0;
}
-AVCodec tta_decoder = {
+AVCodec ff_tta_decoder = {
"tta",
AVMEDIA_TYPE_AUDIO,
CODEC_ID_TTA,