summaryrefslogtreecommitdiff
path: root/libavcodec/xsubdec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-08-05 12:11:28 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-08-05 12:11:28 +0000
commite3c90129a4a58907f3ece48ac3dbb24a84f65eb4 (patch)
tree0462ef1bab23e0b3a8353fc14224366bb5bc8e38 /libavcodec/xsubdec.c
parent3c247b4ff76a5e93ea18a7b0817fdf598bb38757 (diff)
Fix deinterlacing for odd height
Originally committed as revision 9942 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/xsubdec.c')
-rw-r--r--libavcodec/xsubdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c
index 9a90bf4fdf..752c23744f 100644
--- a/libavcodec/xsubdec.c
+++ b/libavcodec/xsubdec.c
@@ -84,7 +84,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
bitmap = sub->rects[0].bitmap;
for (y = 0; y < h; y++) {
// interlaced: do odd lines
- if (y == h / 2) bitmap = sub->rects[0].bitmap + w;
+ if (y == (h + 1) / 2) bitmap = sub->rects[0].bitmap + w;
for (x = 0; x < w; ) {
int log2 = ff_log2_tab[show_bits(&gb, 8)];
int run = get_bits(&gb, 14 - 4 * (log2 >> 1));