mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Remove useless casts and memset.
Originally committed as revision 24186 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e1d7c8831c
commit
3174073623
@ -356,9 +356,7 @@ static void delete_state(DVBSubContext *ctx)
|
||||
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_init_decoder(AVCodecContext *avctx)
|
||||
|
||||
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 int dvbsub_read_8bit_string(uint8_t *destbuf, int dbuf_len,
|
||||
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_pixel_data_block(AVCodecContext *avctx, DVBSubObjectDis
|
||||
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_object_segment(AVCodecContext *avctx,
|
||||
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_clut_segment(AVCodecContext *avctx,
|
||||
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_region_segment(AVCodecContext *avctx,
|
||||
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 void dvbsub_parse_display_definition_segment(AVCodecContext *avctx,
|
||||
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 @@ static int dvbsub_decode(AVCodecContext *avctx,
|
||||
{
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user