From a17a7661906ba295d67afd80ac0770422e1b02b3 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Wed, 14 Oct 2015 11:33:25 +0200 Subject: lavc: Add data and linesize to AVSubtitleRect Use the new fields directly instead of the ones from AVPicture. This removes a layer of indirection which serves no pratical purpose whatsoever, and will help in removing AVPicture structure completely later. Every subtitle encoder/decoder seamlessly points to the new arrays, so it is possible to deprecate AVSubtitleRect.pict. Signed-off-by: Vittorio Giovara --- avplay.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'avplay.c') diff --git a/avplay.c b/avplay.c index 546fb90566..b666eb773e 100644 --- a/avplay.c +++ b/avplay.c @@ -455,9 +455,9 @@ static void blend_subrect(AVPicture *dst, const AVSubtitleRect *rect, int imgw, width2 = ((dstw + 1) >> 1) + (dstx & ~dstw & 1); skip2 = dstx >> 1; wrap = dst->linesize[0]; - wrap3 = rect->pict.linesize[0]; - p = rect->pict.data[0]; - pal = (const uint32_t *)rect->pict.data[1]; /* Now in YCrCb! */ + wrap3 = rect->linesize[0]; + p = rect->data[0]; + pal = (const uint32_t *)rect->data[1]; /* Now in YCrCb! */ if (dsty & 1) { lum += dstx; @@ -1758,11 +1758,11 @@ static int subtitle_thread(void *arg) { for (j = 0; j < sp->sub.rects[i]->nb_colors; j++) { - RGBA_IN(r, g, b, a, (uint32_t*)sp->sub.rects[i]->pict.data[1] + j); + RGBA_IN(r, g, b, a, (uint32_t *)sp->sub.rects[i]->data[1] + 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((uint32_t*)sp->sub.rects[i]->pict.data[1] + j, y, u, v, a); + YUVA_OUT((uint32_t *)sp->sub.rects[i]->data[1] + j, y, u, v, a); } } -- cgit v1.2.3