Mercurial > libavcodec.hg
comparison xsubdec.c @ 9988:b8a9cfe64488 libavcodec
Set subtitle type in DVD and XSUB subtitle decoders.
Patch by Janne Grunau <ja?ne-f?mpeg jannau net>.
author | stefano |
---|---|
date | Sun, 26 Jul 2009 23:08:04 +0000 |
parents | 0dce4fe6e6f3 |
children | b8313eb3dca8 |
comparison
equal
deleted
inserted
replaced
9987:6445be96aaa1 | 9988:b8a9cfe64488 |
---|---|
89 sub->num_rects = 1; | 89 sub->num_rects = 1; |
90 } | 90 } |
91 av_freep(&sub->rects[0]->pict.data[0]); | 91 av_freep(&sub->rects[0]->pict.data[0]); |
92 sub->rects[0]->x = x; sub->rects[0]->y = y; | 92 sub->rects[0]->x = x; sub->rects[0]->y = y; |
93 sub->rects[0]->w = w; sub->rects[0]->h = h; | 93 sub->rects[0]->w = w; sub->rects[0]->h = h; |
94 sub->rects[0]->type = SUBTITLE_BITMAP; | |
94 sub->rects[0]->pict.linesize[0] = w; | 95 sub->rects[0]->pict.linesize[0] = w; |
95 sub->rects[0]->pict.data[0] = av_malloc(w * h); | 96 sub->rects[0]->pict.data[0] = av_malloc(w * h); |
96 sub->rects[0]->nb_colors = 4; | 97 sub->rects[0]->nb_colors = 4; |
97 sub->rects[0]->pict.data[1] = av_malloc(sub->rects[0]->nb_colors * 4); | 98 sub->rects[0]->pict.data[1] = av_malloc(sub->rects[0]->nb_colors * 4); |
98 | 99 |