From patchwork Mon Oct 17 00:34:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 1032 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.133 with SMTP id o127csp135626vsd; Sun, 16 Oct 2016 17:36:28 -0700 (PDT) X-Received: by 10.194.154.227 with SMTP id vr3mr10070249wjb.127.1476664588529; Sun, 16 Oct 2016 17:36:28 -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 g3si37703483wjx.180.2016.10.16.17.36.28; Sun, 16 Oct 2016 17:36:28 -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 A177A689923; Mon, 17 Oct 2016 03:36:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yb0-f194.google.com (mail-yb0-f194.google.com [209.85.213.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 29FDC687EC6 for ; Mon, 17 Oct 2016 03:36:12 +0300 (EEST) Received: by mail-yb0-f194.google.com with SMTP id x128so145984ybg.2 for ; Sun, 16 Oct 2016 17:36:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=QxJITYiFnt3Ujk88U02dBMLKtfxBG/kzQgl9JA2MwZM=; b=mVgljQnflSD7+7tsBN2IbU3qfIGE28NtpGsuBCGPeQyFkaariaDRCgDiFRn7F1VVmJ ZsUgZfoCZrCppCTBRx8gDvwAUWr02z7DL6VR0mDSGA1fSiMzuK1v7yNmWBOZenrFxjtO 1lLx72TAK4RcC4RR5cnAVMHndwER4Zld/Nrfux2sWIaGWmk7WkfjSLTrP5e/KUOQ8gv0 0oDFGZ+eP0bKowKKlgbUyW6+EmLdWpC9H/RzeH1IFzMZp9nZDp3TvBC4uT3zYueLR0r3 a+ep7iQRxMlUft4y7QgqQlgAoKDvg2ZuAJZBeHQMVy69CFr2l8nB35M1RM/7nFNFBniv EOKg== 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:in-reply-to :references; bh=QxJITYiFnt3Ujk88U02dBMLKtfxBG/kzQgl9JA2MwZM=; b=T+uUZ1v5HASHJlN2EKSWnbroglcW3RHXK8gw8lFCA8uCwYE+h12Lcn7VMj69DrFO0Z 9iYnJsdC/hruvbuBLTXxYbrJGxOX8a6YBR0uR97babsNeI22mZ0pPm+U4TXrccElaO56 mtjVAgar+kmuHZf9HCyW2v/0pRZDp/LUYueYXYTue/8rChbBGfIrtK6eUsO85NotJfDe tvbGTP9ZipfVVaYNdd8Iw251TKHXJ6Xm2ngiJks8+JCyL3pE9zviRemdesFQ6LoDJkh8 C2LwEgUfGCQwcIV+izFSC1F2mnhuOz8CLnAxcp038rd18B1IIvlqnHd5j5UlsISAOGzh 6NKA== X-Gm-Message-State: AA6/9Rl7rnreetmAsugIa0V18asTVAW1flz9JRzaHrsiqm+Q1iKypKCYFSfSvygm37VpPA== X-Received: by 10.37.208.130 with SMTP id h124mr20749653ybg.25.1476664572941; Sun, 16 Oct 2016 17:36:12 -0700 (PDT) Received: from localhost.localdomain ([181.22.59.227]) by smtp.gmail.com with ESMTPSA id e72sm10834672ywa.54.2016.10.16.17.36.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Oct 2016 17:36:12 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Oct 2016 21:34:51 -0300 Message-Id: <20161017003451.8152-2-jamrial@gmail.com> X-Mailer: git-send-email 2.9.1 In-Reply-To: <20161017003451.8152-1-jamrial@gmail.com> References: <20161017003451.8152-1-jamrial@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/2] avformat/mov: pass the demuxer's AVFormatContext to avpriv_request_sample() 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" Signed-off-by: James Almer --- libavformat/mov.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 7462ecf..5189706 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2762,7 +2762,8 @@ static int mov_read_sbgp(MOVContext *c, AVIOContext *pb, MOVAtom atom) /** * Get ith edit list entry (media time, duration). */ -static int get_edit_list_entry(const MOVStreamContext *msc, +static int get_edit_list_entry(MOVContext *mov, + const MOVStreamContext *msc, unsigned int edit_list_index, int64_t *edit_list_media_time, int64_t *edit_list_duration, @@ -2776,7 +2777,7 @@ static int get_edit_list_entry(const MOVStreamContext *msc, /* duration is in global timescale units;convert to msc timescale */ if (global_timescale == 0) { - avpriv_request_sample(msc, "Support for mvhd.timescale = 0 with editlists"); + avpriv_request_sample(mov->fc, "Support for mvhd.timescale = 0 with editlists"); return 0; } *edit_list_duration = av_rescale(*edit_list_duration, msc->time_scale, @@ -2968,7 +2969,7 @@ static void mov_fix_index(MOVContext *mov, AVStream *st) start_dts = edit_list_dts_entry_end; - while (get_edit_list_entry(msc, edit_list_index, &edit_list_media_time, + while (get_edit_list_entry(mov, msc, edit_list_index, &edit_list_media_time, &edit_list_duration, mov->time_scale)) { av_log(mov->fc, AV_LOG_DEBUG, "Processing st: %d, edit list %"PRId64" - media time: %"PRId64", duration: %"PRId64"\n", st->index, edit_list_index, edit_list_media_time, edit_list_duration);