From patchwork Thu Mar 29 10:14:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 8220 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.70 with SMTP id c67csp1500999jad; Thu, 29 Mar 2018 03:14:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+QWUHy/A83BT78j83pmOSw/iT/Hao1gZJQleEAdKfjQEd6ZZxk1aUKrYrtxtWa+PgKJYDi X-Received: by 10.223.165.3 with SMTP id i3mr6396898wrb.283.1522318491156; Thu, 29 Mar 2018 03:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522318491; cv=none; d=google.com; s=arc-20160816; b=gsEx0rTdfeKOz/g7t6HMYe+aOf7cIFTjfOfwLL6KDrQNcx0tBZUh12goppnjIgtj+a kVdJ0+PnID/khz8StqgkiqXF4sGYLM+I1Daa46ZCU7RELuSHrWG/3AYPA+jvIB7GJ0cD c5ffo2l/HNiCCRTf7yraWdKRsE0zPT5ecwfZ9R/2Z78V5vZJeTxBiqeZt0WE0KnNMRNu 7T9xw/imNm3SmM9uS1jr7AvbqWsjxeMPbj1BlWjvjBKcDUBhu+MxZGD6tvgBisKFtZaK OLnApVlyzxrVB1PF3sMRW5j9mE1tUTKmlZvIwoG1JTJ1Tufr9zwCFZY9NWGwj6Zr79Qn ThJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :in-reply-to:mime-version:references:message-id:to:from:date :delivered-to:arc-authentication-results; bh=uRytcyHyMBi0TIEcmAmo3jBwVQ/Kv2Xyg/TUblY77Ck=; b=t7SMHWrmQF6t+Bh0I1iEUnwfM/10p4d9/xNE2TBhnTO5OCCsC1NIYjEJes5IxSbO+Z irFHv2NkZLMSHD5k/3oweFx7r2fI2Xcr4Xf/rxOPWUSq9F3y0XI8+t988Vs5sgdYVgVn f2ZYcjrNIDTJdWBLBvhdfHeAP2MtQv7EQNEObWT4kHhssmEjUbf/yzSM+FxuVCpb/+ua NI024GjnLZwIa1SyiiGU4SsqkjbupejT1eHphQeQbtNb4e1+dsKEI0hVUvx3IUYqE8Gu uuhyhSsQY4iYwh505EgWCVPaPKrYNCONVkoOrq+4Sg7lyCziU8Vi4wvwFe4Ec9TWHrQE CiZA== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 19si1927365wmn.0.2018.03.29.03.14.49; Thu, 29 Mar 2018 03:14:51 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C9466689C74; Thu, 29 Mar 2018 13:14:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2F63B68019E for ; Thu, 29 Mar 2018 13:14:23 +0300 (EEST) X-Originating-IP: 213.47.41.20 Received: from localhost (unknown [213.47.41.20]) (Authenticated sender: michael@niedermayer.cc) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 2B87CE0027 for ; Thu, 29 Mar 2018 12:14:40 +0200 (CEST) Date: Thu, 29 Mar 2018 12:14:39 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20180329101439.GD20131@michaelspb> References: <20180328215318.30201-1-jeebjp@gmail.com> MIME-Version: 1.0 In-Reply-To: <20180328215318.30201-1-jeebjp@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [FFmpeg-devel] [PATCH] ffmpeg: prevent premature EOF in sub2video with nullptr AVSubtitles 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" On Thu, Mar 29, 2018 at 12:53:18AM +0300, Jan Ekström wrote: > From: Jan Ekström > > With some streams multiple nullptr AVSubtitles can get pushed > into sub2video_update() in a row. > > This causes end_pts, and on the next round pts, to become > INT64_MAX, latter of which signals EOF in framesync, leading to > complete loss of subtitles from that point on. > > Thus, utilize the previous sub2video.end_pts as both the pts and > end_pts in case a nullptr AVSubtitle is received. This lets further > incoming subtitle packets be properly processed, as EOF is not hit > in framesync. > > Signed-off-by: Jan Ekström > --- > fftools/ffmpeg.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) this breaks fate-sub2video TEST sub2video Test sub2video failed. Look at tests/data/fate/sub2video.err for details. make: *** [fate-sub2video] Error 1 [...] --- ./tests/ref/fate/sub2video 2018-03-29 02:30:48.095578219 +0200 +++ tests/data/fate/sub2video 2018-03-29 12:13:25.191428538 +0200 @@ -68,7 +68,8 @@ 0, 258, 258, 1, 518400, 0x34cdddee 0, 269, 269, 1, 518400, 0xbab197ea 1, 53910000, 53910000, 2696000, 2095, 0x61bb15ed, F=0x0 -0, 270, 270, 1, 518400, 0x4db4ce51 +0, 270, 270, 1, 518400, 0xbab197ea +0, 271, 271, 1, 518400, 0x4db4ce51 0, 283, 283, 1, 518400, 0xbab197ea 1, 56663000, 56663000, 1262000, 1013, 0xc9ae89b7, F=0x0 0, 284, 284, 1, 518400, 0xe6bc0ea9 @@ -137,7 +138,7 @@ 1, 168049000, 168049000, 1900000, 1312, 0x0bf20e8d, F=0x0 0, 850, 850, 1, 518400, 0xbab197ea 1, 170035000, 170035000, 1524000, 1279, 0xb6c2dafe, F=0x0 -0, 851, 851, 1, 518400, 0x8780239e +0, 851, 851, 1, 518400, 0xbab197ea 0, 858, 858, 1, 518400, 0xbab197ea 0, 861, 861, 1, 518400, 0x6eb72347 1, 172203000, 172203000, 1695000, 1826, 0x9a1ac769, F=0x0 @@ -161,7 +162,8 @@ 0, 976, 976, 1, 518400, 0x923d1ce7 0, 981, 981, 1, 518400, 0xbab197ea 1, 196361000, 196361000, 1524000, 1715, 0x695ca41e, F=0x0 -0, 982, 982, 1, 518400, 0x6e652cd2 +0, 982, 982, 1, 518400, 0xbab197ea +0, 983, 983, 1, 518400, 0x6e652cd2 0, 989, 989, 1, 518400, 0xbab197ea 1, 197946000, 197946000, 1160000, 789, 0xc63a189e, F=0x0 0, 990, 990, 1, 518400, 0x25113966