Mercurial > libavcodec.hg
changeset 12135:0f987eea1349 libavcodec
Remove useless casts and memset.
author | reimar |
---|---|
date | Sun, 11 Jul 2010 07:45:42 +0000 |
parents | cb3eb3a2fc96 |
children | 31bca176d2d9 |
files | dvbsubdec.c |
diffstat | 1 files changed, 10 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/dvbsubdec.c Sun Jul 11 07:35:00 2010 +0000 +++ b/dvbsubdec.c Sun Jul 11 07:45:42 2010 +0000 @@ -356,9 +356,7 @@ 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; @@ -428,7 +426,7 @@ 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); @@ -731,7 +729,7 @@ 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; @@ -848,7 +846,7 @@ 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; @@ -907,7 +905,7 @@ 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; @@ -995,7 +993,7 @@ 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; @@ -1107,7 +1105,7 @@ 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; @@ -1311,7 +1309,7 @@ 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; @@ -1399,8 +1397,8 @@ { 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;