Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Caulfield <ian.caulfield@gmx.at>2007-01-30 17:19:43 +0300
committerPanagiotis Issaris <takis.issaris@uhasselt.be>2007-01-30 17:19:43 +0300
commit4ee97612c7999141832a573ab7b217d5974e3582 (patch)
tree03643afd1897e4debeacc17ac7b76037631a865f /libavcodec/dvdsubdec.c
parent68fcdbf1e570d16ca76e28a1f799dfa72a62e79a (diff)
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
Diffstat (limited to 'libavcodec/dvdsubdec.c')
-rw-r--r--libavcodec/dvdsubdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index 9a0dd7756d..ea57a8ac2f 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -249,7 +249,7 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
sub_header->rects = av_mallocz(sizeof(AVSubtitleRect));
sub_header->num_rects = 1;
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);
decode_rle(bitmap + w, w * 2, w, h / 2,
buf, offset2 * 2, buf_size);