Changeset 1009
- Timestamp:
- 01/05/09 11:17:06 (1 year ago)
- Files:
-
- trunk/VobSubCodec.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/VobSubCodec.c
r1001 r1009 118 118 if (glob->subtitle.rects) { 119 119 for (i = 0; i < glob->subtitle.num_rects; i++) { 120 av_free(glob->subtitle.rects[i].rgba_palette); 121 av_free(glob->subtitle.rects[i].bitmap); 120 av_freep(glob->subtitle.rects[i]->pict.data[0]); 121 av_freep(glob->subtitle.rects[i]->pict.data[1]); 122 av_freep(glob->subtitle.rects[i]); 122 123 } 123 124 av_free(glob->subtitle.rects); … … 348 349 349 350 for (i = 0; i < glob->subtitle.num_rects; i++) { 350 AVSubtitleRect *rect = &glob->subtitle.rects[i];351 AVSubtitleRect *rect = glob->subtitle.rects[i]; 351 352 uint8_t *line = (uint8_t *)drp->baseAddr + drp->rowBytes * rect->y + rect->x*4; 352 uint8_t *sub = rect-> bitmap;353 uint8_t *sub = rect->pict.data[0]; 353 354 unsigned int w = FFMIN(rect->w, myDrp->width - rect->x); 354 355 unsigned int h = FFMIN(rect->h, myDrp->height - rect->y); 356 uint32_t *palette = (uint32_t *)rect->pict.data[1]; 355 357 356 358 if (usePalette) { 357 359 for (j = 0; j < 4; j++) 358 rect->rgba_palette[j] = controlData.pixelColor[j];360 palette[j] = controlData.pixelColor[j]; 359 361 } 360 362 … … 363 365 364 366 for (x = 0; x < w; x++) 365 pixel[x] = rect->rgba_palette[sub[x]];367 pixel[x] = palette[sub[x]]; 366 368 367 369 line += drp->rowBytes; 368 sub += rect-> linesize;370 sub += rect->pict.linesize[0]; 369 371 } 370 372 }
