Browse Source

Set subtitle type in DVD and XSUB subtitle decoders.

Patch by Janne Grunau <ja?ne-f?mpeg jannau net>.

Originally committed as revision 19512 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Janne Grunau Stefano Sabatini 16 years ago
parent
commit
6dc13ccbcc
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      libavcodec/dvdsubdec.c
  2. +1
    -0
      libavcodec/xsubdec.c

+ 1
- 0
libavcodec/dvdsubdec.c View File

@@ -353,6 +353,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
sub_header->rects[0]->y = y1;
sub_header->rects[0]->w = w;
sub_header->rects[0]->h = h;
sub_header->rects[0]->type = SUBTITLE_BITMAP;
sub_header->rects[0]->pict.linesize[0] = w;
}
}


+ 1
- 0
libavcodec/xsubdec.c View File

@@ -91,6 +91,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
av_freep(&sub->rects[0]->pict.data[0]);
sub->rects[0]->x = x; sub->rects[0]->y = y;
sub->rects[0]->w = w; sub->rects[0]->h = h;
sub->rects[0]->type = SUBTITLE_BITMAP;
sub->rects[0]->pict.linesize[0] = w;
sub->rects[0]->pict.data[0] = av_malloc(w * h);
sub->rects[0]->nb_colors = 4;


Loading…
Cancel
Save