diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-01-03 17:54:48 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-01-03 17:54:48 +0000 |
commit | db4fac64db305e14f04d87f639b3fc851266b38c (patch) | |
tree | 942e9a98911e53b3d33ea9024e201438fef5556c /libavcodec/dvbsubdec.c | |
parent | 7cf9c6ae40181f2d769ce73bf141c445f036f30c (diff) | |
download | ffmpeg-db4fac64db305e14f04d87f639b3fc851266b38c.tar.gz |
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
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r-- | libavcodec/dvbsubdec.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index 3f47c1b4d6..785e461072 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -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; |