[FFmpeg-cvslog] libavcodec/dvbsub: fix for Display Definition Segment

Pierre Yves MORDRET git at videolan.org
Fri Dec 13 17:00:38 CET 2013


ffmpeg | branch: master | Pierre Yves MORDRET <pierre-yves.mordret at st.com> | Fri Dec 13 14:29:09 2013 +0100| [0f02ea0afe969fb5d37a879ef77ceb6d86f6dc4e] | committer: Michael Niedermayer

libavcodec/dvbsub: fix for Display Definition Segment

Given ETSI EN 300 743 V1.3.1 (2006-11), 7.2.1 Display definition segment
display window parameters are given in this order XMin, XMax, YMin, YMax
if  display_window_flag is set, but here this is not the case.
As a consequence the DVB subtitles are not displayed upon some videos.

Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret at st.com>
Reviewed-by: Kieran Kunhya <kierank at obe.tv>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f02ea0afe969fb5d37a879ef77ceb6d86f6dc4e
---

 libavcodec/dvbsubdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index b8b4143..8f4e984 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;
     }
 }



More information about the ffmpeg-cvslog mailing list