]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cljr.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / cljr.c
index c9b09116745bdb41e75d8506c1ecd604db4fa789..8af149fa58d73a952008f37f371ec0f70c40b62b 100644 (file)
@@ -67,7 +67,7 @@ static int decode_frame(AVCodecContext *avctx,
     p->pict_type= AV_PICTURE_TYPE_I;
     p->key_frame= 1;
 
-    init_get_bits(&a->gb, buf, buf_size);
+    init_get_bits(&a->gb, buf, buf_size * 8);
 
     for(y=0; y<avctx->height; y++){
         uint8_t *luma= &a->picture.data[0][ y*a->picture.linesize[0] ];
@@ -142,27 +142,24 @@ static av_cold int encode_init(AVCodecContext *avctx){
 #endif
 
 AVCodec ff_cljr_decoder = {
-    "cljr",
-    AVMEDIA_TYPE_VIDEO,
-    CODEC_ID_CLJR,
-    sizeof(CLJRContext),
-    decode_init,
-    NULL,
-    NULL,
-    decode_frame,
-    CODEC_CAP_DR1,
+    .name           = "cljr",
+    .type           = AVMEDIA_TYPE_VIDEO,
+    .id             = CODEC_ID_CLJR,
+    .priv_data_size = sizeof(CLJRContext),
+    .init           = decode_init,
+    .decode         = decode_frame,
+    .capabilities   = CODEC_CAP_DR1,
     .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
 };
 
 #if CONFIG_CLJR_ENCODER
 AVCodec ff_cljr_encoder = {
-    "cljr",
-    AVMEDIA_TYPE_VIDEO,
-    CODEC_ID_CLJR,
-    sizeof(CLJRContext),
-    encode_init,
-    encode_frame,
-    //encode_end,
+    .name           = "cljr",
+    .type           = AVMEDIA_TYPE_VIDEO,
+    .id             = CODEC_ID_CLJR,
+    .priv_data_size = sizeof(CLJRContext),
+    .init           = encode_init,
+    .encode         = encode_frame,
     .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"),
 };
 #endif