summaryrefslogtreecommitdiff
path: root/libavcodec/xsubenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/xsubenc.c')
-rw-r--r--libavcodec/xsubenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/xsubenc.c b/libavcodec/xsubenc.c
index 9dc80ee4af..bb2cdb0529 100644
--- a/libavcodec/xsubenc.c
+++ b/libavcodec/xsubenc.c
@@ -166,8 +166,8 @@ static int xsub_encode(AVCodecContext *avctx, unsigned char *buf,
bytestream_put_le16(&hdr, height);
bytestream_put_le16(&hdr, h->rects[0]->x);
bytestream_put_le16(&hdr, h->rects[0]->y);
- bytestream_put_le16(&hdr, h->rects[0]->x + width);
- bytestream_put_le16(&hdr, h->rects[0]->y + height);
+ bytestream_put_le16(&hdr, h->rects[0]->x + width -1);
+ bytestream_put_le16(&hdr, h->rects[0]->y + height -1);
rlelenptr = hdr; // Will store length of first field here later.
hdr+=2;