From patchwork Sat Sep 17 21:22:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul B Mahol X-Patchwork-Id: 607 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp338984vsd; Sat, 17 Sep 2016 14:22:52 -0700 (PDT) X-Received: by 10.194.112.68 with SMTP id io4mr17441275wjb.1.1474147372749; Sat, 17 Sep 2016 14:22:52 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y62si13144528wmb.132.2016.09.17.14.22.52; Sat, 17 Sep 2016 14:22:52 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 32608689EB7; Sun, 18 Sep 2016 00:22:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B500D689C48 for ; Sun, 18 Sep 2016 00:22:30 +0300 (EEST) Received: by mail-wm0-f67.google.com with SMTP id w84so1753135wmg.0 for ; Sat, 17 Sep 2016 14:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=WQ6Cxmg8yUVPQHVyg5uZDeNwWWF3u1r8HCCJX6cZ/Z4=; b=VJEhE6aypSaflEkcW65yx2RUxqK95wV8e4H4nrN4IvPgUtJo2Wt/R2u+Q4gEKIAdL1 70/uW0t+qWo/THorZgABj0yDOhlbGzxsFxf7TPPDpiWb5jmnnGFtP1Kx5X9+h0AXoo+m qJQMnFMg513JPn3j8JlCBpclK05Lx7WsBeOHI9aq77Aq+xjmVfEANOJnSZ1AK9XSus/n AufVVlAyeTr01KxyXUGAtMDmrYjNcSRJYHShdlYSDtqDmoVStSE/dhURRYIGG6nTcl4T BQgprauLuQeXpqBGXIbNYmmpDsKmGUjPn38WH2Z4LvudlhByXT3+P0/Ygqg8cSVBB5r5 01EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=WQ6Cxmg8yUVPQHVyg5uZDeNwWWF3u1r8HCCJX6cZ/Z4=; b=cqm5WMDKNSpzaIzQX3d+hG7880S1el85AJ6df1S1yDvpx/zSxEuHEMQpDXDFRc662i MmUXNQbGVkfWHgGWrtfdtv/l3DJDdrwko3Kr9oJN2FJv9dHJdw1RmpPw74nhiHtqXKu7 jLbe9H9sUh/s5JWh1gx+uEhPK398fE58t2hHsfBz3coK9FdNuoBRKcEQzGzPNE4Vhmuu frnRQ4AM9alGSNjACApTTeaN6hXg1DzC2uIwQW63jNkyVwniAc+umgMBkDF8sSoQNGyo KdolyGkMzosN12+MXWsNBmtrmnzGl67idlgh0sVHZdf6hTugDb/xX2wCVcMPVU0E+T/I wK9Q== X-Gm-Message-State: AE9vXwOJ66BExdLlTPoJDHor4FzZELke/GiZ2XgQlq8hLnhGucErt0SmHT6RTlyRFvu/fA== X-Received: by 10.194.85.18 with SMTP id d18mr17402707wjz.43.1474147364264; Sat, 17 Sep 2016 14:22:44 -0700 (PDT) Received: from computer.gigaset.lan (141-136-213-61.dsl.iskon.hr. [141.136.213.61]) by smtp.gmail.com with ESMTPSA id w129sm13809184wmd.9.2016.09.17.14.22.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Sep 2016 14:22:43 -0700 (PDT) From: Paul B Mahol To: ffmpeg-devel@ffmpeg.org Date: Sat, 17 Sep 2016 23:22:33 +0200 Message-Id: <1474147353-19972-1-git-send-email-onemda@gmail.com> X-Mailer: git-send-email 2.5.0 Subject: [FFmpeg-devel] [PATCH] avcodec/dvdsubdec: ignore h <= 1 case, to properly decode subtitle X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixes #5825. Regression since: 3f0a3e9e127d067c5cf65640a44765c1ddd01622. Signed-off-by: Paul B Mahol --- libavcodec/dvdsubdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 19f25f0..b81b481 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -368,7 +368,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, h = y2 - y1 + 1; if (h < 0) h = 0; - if (w > 0 && h > 0) { + if (w > 0 && h > 1) { reset_rects(sub_header); sub_header->rects = av_mallocz(sizeof(*sub_header->rects));