}
}
-static int dvdsub_init_decoder(AVCodecContext *avctx)
-{
- return 0;
-}
-
static int decode_run_2bit(GetBitContext *gb, int *color)
{
unsigned int v, t;
} else {
sub_header->rects[0].rgba_palette = av_malloc(4 * 4);
sub_header->rects[0].nb_colors = 4;
- guess_palette(sub_header->rects[0].rgba_palette,
- colormap, alpha, 0xffff00);
+ guess_palette(sub_header->rects[0].rgba_palette,
+ colormap, alpha, 0xffff00);
}
sub_header->rects[0].x = x1;
sub_header->rects[0].y = y1;
return 1;
}
-static int dvdsub_close_decoder(AVCodecContext *avctx)
-{
- return 0;
-}
-
#ifdef DEBUG
#undef fprintf
static void ppm_save(const char *filename, uint8_t *bitmap, int w, int h,
static int dvdsub_decode(AVCodecContext *avctx,
void *data, int *data_size,
- uint8_t *buf, int buf_size)
+ const uint8_t *buf, int buf_size)
{
AVSubtitle *sub = (void *)data;
int is_menu;
CODEC_TYPE_SUBTITLE,
CODEC_ID_DVD_SUBTITLE,
0,
- dvdsub_init_decoder,
NULL,
- dvdsub_close_decoder,
+ NULL,
+ NULL,
dvdsub_decode,
+ .long_name = "DVD subtitles",
};