]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dvbsubdec.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / dvbsubdec.c
index ef90f73c1a2d04648de7bad3fb534251deb2b12f..955925a619882d82ead28ea1b5010e8d4272c624 100644 (file)
@@ -1343,6 +1343,10 @@ static void dvbsub_parse_display_definition_segment(AVCodecContext *avctx,
     display_def->y       = 0;
     display_def->width   = bytestream_get_be16(&buf) + 1;
     display_def->height  = bytestream_get_be16(&buf) + 1;
+    if (!avctx->width || !avctx->height) {
+        avctx->width  = display_def->width;
+        avctx->height = display_def->height;
+    }
 
     if (buf_size < 13)
         return;