Revision db4fac64 libavcodec/dvbsubdec.c

View differences:

libavcodec/dvbsubdec.c
1285 1285

  
1286 1286
    sub->num_rects = ctx->display_list_size;
1287 1287

  
1288
    if (sub->num_rects > 0)
1289
        sub->rects = av_mallocz(sizeof(AVSubtitleRect) * sub->num_rects);
1288
    if (sub->num_rects > 0){
1289
        sub->rects = av_mallocz(sizeof(*sub->rects) * sub->num_rects);
1290
        for(i=0; i<sub->num_rects; i++)
1291
            sub->rects[i] = av_mallocz(sizeof(*sub->rects[i]));
1292
    }
1290 1293

  
1291 1294
    i = 0;
1292 1295

  
1293 1296
    for (display = ctx->display_list; display; display = display->next) {
1294 1297
        region = get_region(ctx, display->region_id);
1295
        rect = &sub->rects[i];
1298
        rect = sub->rects[i];
1296 1299

  
1297 1300
        if (!region)
1298 1301
            continue;

Also available in: Unified diff