Commit 4ee97612 authored by Ian Caulfield's avatar Ian Caulfield Committed by Panagiotis Issaris

Fix a bug in the DVD subtitle decoder where subtitles with odd heights would not

have the last line decoded, leaving the bottom line of the bitmap array
uninitialised. Patch by Ian Caulfield, ian dot caulfield gmail dot com.

Originally committed as revision 7767 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 68fcdbf1
...@@ -249,7 +249,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header, ...@@ -249,7 +249,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
sub_header->rects = av_mallocz(sizeof(AVSubtitleRect)); sub_header->rects = av_mallocz(sizeof(AVSubtitleRect));
sub_header->num_rects = 1; sub_header->num_rects = 1;
sub_header->rects[0].rgba_palette = av_malloc(4 * 4); sub_header->rects[0].rgba_palette = av_malloc(4 * 4);
decode_rle(bitmap, w * 2, w, h / 2, decode_rle(bitmap, w * 2, w, (h + 1) / 2,
buf, offset1 * 2, buf_size); buf, offset1 * 2, buf_size);
decode_rle(bitmap + w, w * 2, w, h / 2, decode_rle(bitmap + w, w * 2, w, h / 2,
buf, offset2 * 2, buf_size); buf, offset2 * 2, buf_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment