ret = AVERROR(ENOMEM);
goto fail;
}
- memcpy(rect->data[1], clut_table, (1 << region->depth) * sizeof(uint32_t));
+ memcpy(rect->data[1], clut_table, (1 << region->depth) * sizeof(*clut_table));
rect->data[0] = av_malloc(region->buf_size);
if (!rect->data[0]) {
clut = get_clut(ctx, clut_id);
if (!clut) {
- clut = av_malloc(sizeof(DVBSubCLUT));
+ clut = av_malloc(sizeof(*clut));
if (!clut)
return AVERROR(ENOMEM);
- memcpy(clut, &default_clut, sizeof(DVBSubCLUT));
+ memcpy(clut, &default_clut, sizeof(*clut));
clut->id = clut_id;
clut->version = -1;
region = get_region(ctx, region_id);
if (!region) {
- region = av_mallocz(sizeof(DVBSubRegion));
+ region = av_mallocz(sizeof(*region));
if (!region)
return AVERROR(ENOMEM);
object = get_object(ctx, object_id);
if (!object) {
- object = av_mallocz(sizeof(DVBSubObject));
+ object = av_mallocz(sizeof(*object));
if (!object)
return AVERROR(ENOMEM);
object->type = (*buf) >> 6;
- display = av_mallocz(sizeof(DVBSubObjectDisplay));
+ display = av_mallocz(sizeof(*display));
if (!display)
return AVERROR(ENOMEM);
}
if (!display) {
- display = av_mallocz(sizeof(DVBSubRegionDisplay));
+ display = av_mallocz(sizeof(*display));
if (!display)
return AVERROR(ENOMEM);
}