From patchwork Thu Sep 7 15:11:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 5037 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.15.201 with SMTP id 70csp321176jao; Thu, 7 Sep 2017 08:12:06 -0700 (PDT) X-Google-Smtp-Source: ADKCNb59KyDnu7BXlF2KWXDYlhCZpcwlEeRuHjfYlZwyFviSJA2Mg5lS1Zsx0jH4uU2HG/uARN7u X-Received: by 10.223.156.203 with SMTP id h11mr2222665wre.178.1504797125940; Thu, 07 Sep 2017 08:12:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504797125; cv=none; d=google.com; s=arc-20160816; b=E24wi21SNBSk33GDdFAWw72RSJVxFCVgIvF4H/u7yGTXpiush112UoevN7tnnYyloZ yyyJ+VABKAHWNrucHwIj0DppENJIa4JhNUMNq3cYgsRjXYh8TjRa2FH1psxDmkJSF+qh 9z+JOMXkhSwbtwQGBfVm7RnT3NuDgplgE38bFaYmfrkB8VbDSH1rJsE6BiYnRcbppeL8 EQcznZ3UVOfdJba5+Hw2hTvUGPaJAd/fCLLJM2uH2rZw0KKZLSJiZyIVdMAZfrS2sr9g 91h53pzWPM3WL61jKTVj78lPmsfKtma9ydNtARO1FprVjPeXxTZ1+WivrHN33P5i+7rn /hPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=/Mr5UuMIEXKuvAUzvib39rvAFTJ7Ca2NiecDdXfGuBg=; b=fVChMe7g9sJqKh0uJe152m8ZP9K7PikuUhLGkcNdvJvewYyzXvAdcbdudEttPDYxS7 Bg7syUVDQynEw9/TsIMYPq1uI8BNUbWZh2+Mq0+jzqg4C0oLnT+vzUyxWz3ZcOkiun2H Lwmgi3Gveoh9VcE44EBrF9psGU8xWNpyAbU+HIJuPfnS5uqRr5CdJSs8V8tIrCevJMtY iBqaXoTNrdX6Y1JB43doJk8/NjdLRwHh54YVDvy4V9GAFdW9hiJpmtuiEriArgywPsVe jOFRNIuqHLyXB87nchhYbftKF2ne6jNazzrufvwkPR3+497uX+VBSNP4oY34UTtJmcSW lMLA== 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 c51si2286541wra.470.2017.09.07.08.12.05; Thu, 07 Sep 2017 08:12:05 -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 6A2856898D1; Thu, 7 Sep 2017 18:11:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BE85C689206 for ; Thu, 7 Sep 2017 18:11:49 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id A110AE1B2F; Thu, 7 Sep 2017 17:11:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8xCMcvmw2IXT; Thu, 7 Sep 2017 17:11:52 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 7CDB2E1B09; Thu, 7 Sep 2017 17:11:52 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2017 17:11:40 +0200 Message-Id: <20170907151140.616-2-cus@passwd.hu> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170907151140.616-1-cus@passwd.hu> References: <20170907151140.616-1-cus@passwd.hu> Subject: [FFmpeg-devel] [PATCH 2/2] avformat/mxfdec: use the common packet pts setter function for opatom files 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 Cc: Marton Balint MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixes ticket #6631. Signed-off-by: Marton Balint --- libavformat/mxfdec.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 3e2f5011ee..476d284c96 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -3217,15 +3217,9 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt) pkt->stream_index = st->index; - if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && t->ptses && - mxf->current_edit_unit >= 0 && mxf->current_edit_unit < t->nb_ptses) { - pkt->dts = mxf->current_edit_unit + t->first_dts; - pkt->pts = t->ptses[mxf->current_edit_unit]; - } else if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { - int ret = mxf_set_audio_pts(mxf, st->codecpar, pkt); - if (ret < 0) - return ret; - } + ret = mxf_set_pts(mxf, st, pkt, next_pos); + if (ret < 0) + return ret; mxf->current_edit_unit += edit_units;