From patchwork Sat Jun 3 16:04:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Licht X-Patchwork-Id: 3819 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.10.2 with SMTP id 2csp667784vsk; Sat, 3 Jun 2017 09:05:09 -0700 (PDT) X-Received: by 10.28.207.201 with SMTP id f192mr2730174wmg.79.1496505909664; Sat, 03 Jun 2017 09:05:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496505909; cv=none; d=google.com; s=arc-20160816; b=gZtXOkmUEthmVNe7HiL8GHOAVv/TsvD9iEepqyKYV93R4WWzzgXLho29mlLoZHUD5O y0y0HuzF3MQ0nhFelmum5GpxIYM+vb/x205rWa0eLXtMa/wVGmfKSOxt9+hlTJhvFUz+ yDlQ49HUYMs17Z9yOeQaiSMNbuoVvt/RFHzw1u3FLg7JoLL5kkRHuuzXbGpcHUFIuCzg txQ3MHZAZ+N2MXtdSUB+V7YqM8pZkgdGvqAtBvQPa3CuvWY4GuOYATG3qjBdWT0J9UCX epKhPOYY7V3o8V/xBXEhURWraNablQ0GQoD86b99eeWayv8hKX+ZDMwjpSMENQEgTzbU piAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:in-reply-to:mime-version:user-agent:date :message-id:from:to:references:delivered-to :arc-authentication-results; bh=fBGdvwdFGVh+rrKAfWve7tWJOFXqfbwzl8+f7hqcRJQ=; b=Ko/QeSTZqOtxTADTsG2jEpgdeh+tjK1MW290jyQq2D/4iFs5i3LFcmndGrpjZm2Jlb 0P/OtnbNl1Tu66huACHsl6U6eXgZoP23kMTQpnxWUgUZJLklpwAya9jEEYqaJlUjpslS 9Heo6/YMkXVtmhERpUdY+01PSafSqjIHl3ME4y+hs3/vwzBkvaqiV2BAeXQgOy3GaXTW OTzPmgIlSN/e3Ge8NLV068ekzptRFdEF45fu98hElMAbI/rm4oJSG19ba6LvEGBJUSoI 94QgmhBNAWK/NQNoC0xc2N1RADw1K1dr67R4XO3TMS/byp1dhPTRJ6cuqFupZHweWXOJ PiWQ== 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 b126si6254338wmc.104.2017.06.03.09.05.09; Sat, 03 Jun 2017 09:05:09 -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 1480D689C73; Sat, 3 Jun 2017 19:05:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.fem.tu-ilmenau.de (mail.fem.tu-ilmenau.de [141.24.220.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2F72F689BEF for ; Sat, 3 Jun 2017 19:04:54 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by mail.fem.tu-ilmenau.de (Postfix) with ESMTP id 3E2456891 for ; Sat, 3 Jun 2017 18:05:00 +0200 (CEST) X-Virus-Scanned: amavisd-new at fem.tu-ilmenau.de Received: from mail.fem.tu-ilmenau.de ([127.0.0.1]) by localhost (mail.fem.tu-ilmenau.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id txe9QJyi3HMd for ; Sat, 3 Jun 2017 18:04:59 +0200 (CEST) Received: from [192.168.200.1] (ipb2181034.dynamic.kabel-deutschland.de [178.24.16.52]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.fem.tu-ilmenau.de (Postfix) with ESMTPSA for ; Sat, 3 Jun 2017 18:04:59 +0200 (CEST) References: <1e76e600-c61a-97d1-e40b-3707cf0357c6@fem.tu-ilmenau.de> To: ffmpeg-devel@ffmpeg.org From: Jonas Licht X-Forwarded-Message-Id: <1e76e600-c61a-97d1-e40b-3707cf0357c6@fem.tu-ilmenau.de> Message-ID: <96e2918b-ccb7-449e-cc01-665a5c18ad81@fem.tu-ilmenau.de> Date: Sat, 3 Jun 2017 18:04:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1e76e600-c61a-97d1-e40b-3707cf0357c6@fem.tu-ilmenau.de> Subject: [FFmpeg-devel] [PATCH] libavformat/mov.c Fixed 'Error while filtering: Operation not permitted' when using -stream_loop, a short file with negativ timestamps and only one keyframe Fixes Ticket #6139 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" --- libavformat/mov.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 3845e63b53..afc2efe063 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -6547,9 +6547,9 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp, { MOVStreamContext *sc = st->priv_data; int sample, time_sample; - int i; - - int ret = mov_seek_fragment(s, st, timestamp); + int i,ret; + timestamp -= sc->time_offset; + ret = mov_seek_fragment(s, st, timestamp); if (ret < 0) return ret;