From db4fac64db305e14f04d87f639b3fc851266b38c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <michaelni@gmx.at> Date: Sat, 3 Jan 2009 17:54:48 +0000 Subject: 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 --- ffplay.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'ffplay.c') diff --git a/ffplay.c b/ffplay.c index 69b1fa1d83..982fb0117b 100644 --- a/ffplay.c +++ b/ffplay.c @@ -636,8 +636,9 @@ static void free_subpicture(SubPicture *sp) for (i = 0; i < sp->sub.num_rects; i++) { - av_free(sp->sub.rects[i].bitmap); - av_free(sp->sub.rects[i].rgba_palette); + av_freep(&sp->sub.rects[i]->bitmap); + av_freep(&sp->sub.rects[i]->rgba_palette); + av_freep(&sp->sub.rects[i]); } av_free(sp->sub.rects); @@ -721,7 +722,7 @@ static void video_image_display(VideoState *is) pict.linesize[2] = vp->bmp->pitches[1]; for (i = 0; i < sp->sub.num_rects; i++) - blend_subrect(&pict, &sp->sub.rects[i], + blend_subrect(&pict, sp->sub.rects[i], vp->bmp->w, vp->bmp->h); SDL_UnlockYUVOverlay (vp->bmp); @@ -1435,13 +1436,13 @@ static int subtitle_thread(void *arg) for (i = 0; i < sp->sub.num_rects; i++) { - for (j = 0; j < sp->sub.rects[i].nb_colors; j++) + for (j = 0; j < sp->sub.rects[i]->nb_colors; j++) { - RGBA_IN(r, g, b, a, sp->sub.rects[i].rgba_palette + j); + RGBA_IN(r, g, b, a, sp->sub.rects[i]->rgba_palette + j); y = RGB_TO_Y_CCIR(r, g, b); u = RGB_TO_U_CCIR(r, g, b, 0); v = RGB_TO_V_CCIR(r, g, b, 0); - YUVA_OUT(sp->sub.rects[i].rgba_palette + j, y, u, v, a); + YUVA_OUT(sp->sub.rects[i]->rgba_palette + j, y, u, v, a); } } -- cgit v1.2.3