Change AVSubtitle.rects to an array of pointers so ABI does not break
when the size of AVSubtitleRect changes. Originally committed as revision 16412 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -1285,14 +1285,17 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf,
|
||||
|
||||
sub->num_rects = ctx->display_list_size;
|
||||
|
||||
if (sub->num_rects > 0)
|
||||
sub->rects = av_mallocz(sizeof(AVSubtitleRect) * sub->num_rects);
|
||||
if (sub->num_rects > 0){
|
||||
sub->rects = av_mallocz(sizeof(*sub->rects) * sub->num_rects);
|
||||
for(i=0; i<sub->num_rects; i++)
|
||||
sub->rects[i] = av_mallocz(sizeof(*sub->rects[i]));
|
||||
}
|
||||
|
||||
i = 0;
|
||||
|
||||
for (display = ctx->display_list; display; display = display->next) {
|
||||
region = get_region(ctx, display->region_id);
|
||||
rect = &sub->rects[i];
|
||||
rect = sub->rects[i];
|
||||
|
||||
if (!region)
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user