]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tta.c
rv34: Fix buffer size used for MC of B frames after a resolution change
[ffmpeg] / libavcodec / tta.c
index 96de9c3202ae46c1f615ba06e69fc342ad2b8891..5a11436ca9fa39266722cf5d30aed15603ed5bdf 100644 (file)
@@ -198,7 +198,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
     if (avctx->extradata_size < 30)
         return -1;
 
-    init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size);
+    init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size * 8);
     if (show_bits_long(&s->gb, 32) == AV_RL32("TTA1"))
     {
         /* signature */
@@ -426,13 +426,12 @@ static av_cold int tta_decode_close(AVCodecContext *avctx) {
 }
 
 AVCodec ff_tta_decoder = {
-    "tta",
-    AVMEDIA_TYPE_AUDIO,
-    CODEC_ID_TTA,
-    sizeof(TTAContext),
-    tta_decode_init,
-    NULL,
-    tta_decode_close,
-    tta_decode_frame,
+    .name           = "tta",
+    .type           = AVMEDIA_TYPE_AUDIO,
+    .id             = CODEC_ID_TTA,
+    .priv_data_size = sizeof(TTAContext),
+    .init           = tta_decode_init,
+    .close          = tta_decode_close,
+    .decode         = tta_decode_frame,
     .long_name = NULL_IF_CONFIG_SMALL("True Audio (TTA)"),
 };