]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tta.c
rtpdec: Cosmetic cleanup of the header
[ffmpeg] / libavcodec / tta.c
index 5590ae28a1ffbf9bc4a1919e3677564096349225..0bd7daba9c792e49d157c8de6de2cb6ce78f08d1 100644 (file)
@@ -32,6 +32,7 @@
 #include <limits.h>
 #include "avcodec.h"
 #include "get_bits.h"
+#include "internal.h"
 #include "libavutil/crc.h"
 
 #define FORMAT_SIMPLE    1
@@ -222,7 +223,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
         }
         if (s->format == FORMAT_ENCRYPTED) {
             av_log_missing_feature(s->avctx, "Encrypted TTA", 0);
-            return AVERROR(EINVAL);
+            return AVERROR_PATCHWELCOME;
         }
         avctx->channels = s->channels = get_bits(&s->gb, 16);
         avctx->bits_per_coded_sample = get_bits(&s->gb, 16);
@@ -331,7 +332,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
 
     /* get output buffer */
     s->frame.nb_samples = framelen;
-    if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+    if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
         return ret;
     }
@@ -469,7 +470,7 @@ static av_cold int tta_decode_close(AVCodecContext *avctx) {
 AVCodec ff_tta_decoder = {
     .name           = "tta",
     .type           = AVMEDIA_TYPE_AUDIO,
-    .id             = CODEC_ID_TTA,
+    .id             = AV_CODEC_ID_TTA,
     .priv_data_size = sizeof(TTAContext),
     .init           = tta_decode_init,
     .close          = tta_decode_close,