diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index b8b414343d..8f4e984802 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -1357,8 +1357,8 @@ static void dvbsub_parse_display_definition_segment(AVCodecContext *avctx, if (info_byte & 1<<3) { // display_window_flag display_def->x = bytestream_get_be16(&buf); - display_def->y = bytestream_get_be16(&buf); display_def->width = bytestream_get_be16(&buf) - display_def->x + 1; + display_def->y = bytestream_get_be16(&buf); display_def->height = bytestream_get_be16(&buf) - display_def->y + 1; } }