static av_cold int dvbsub_init_decoder(AVCodecContext *avctx)
{
int i, r, g, b, a = 0;
- DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
-
- memset(avctx->priv_data, 0, sizeof(DVBSubContext));
+ DVBSubContext *ctx = avctx->priv_data;
ctx->composition_id = avctx->sub_id & 0xffff;
ctx->ancillary_id = avctx->sub_id >> 16;
static av_cold int dvbsub_close_decoder(AVCodecContext *avctx)
{
- DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
+ DVBSubContext *ctx = avctx->priv_data;
DVBSubRegionDisplay *display;
delete_state(ctx);
static void dvbsub_parse_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDisplay *display,
const uint8_t *buf, int buf_size, int top_bottom, int non_mod)
{
- DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
+ DVBSubContext *ctx = avctx->priv_data;
DVBSubRegion *region = get_region(ctx, display->region_id);
const uint8_t *buf_end = buf + buf_size;
static void dvbsub_parse_object_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
- DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
+ DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
const uint8_t *block;
static void dvbsub_parse_clut_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
- DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
+ DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
int clut_id;
static void dvbsub_parse_region_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
- DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
+ DVBSubContext *ctx = avctx->priv_data;
const uint8_t *buf_end = buf + buf_size;
int region_id, object_id;
static void dvbsub_parse_page_segment(AVCodecContext *avctx,
const uint8_t *buf, int buf_size)
{
- DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
+ DVBSubContext *ctx = avctx->priv_data;
DVBSubRegionDisplay *display;
DVBSubRegionDisplay *tmp_display_list, **tmp_ptr;
static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
int buf_size, AVSubtitle *sub)
{
- DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
+ DVBSubContext *ctx = avctx->priv_data;
DVBSubDisplayDefinition *display_def = ctx->display_definition;
DVBSubRegion *region;
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
- DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
- AVSubtitle *sub = (AVSubtitle*) data;
+ DVBSubContext *ctx = avctx->priv_data;
+ AVSubtitle *sub = data;
const uint8_t *p, *p_end;
int segment_type;
int page_id;