From patchwork Sun May 2 13:58:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27553 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a11:cc:0:0:0:0 with SMTP id m12csp1249594pxt; Sun, 2 May 2021 06:58:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwqpHyPVeMzDostID9mYIcK62KPkrsB9iXL1tdTuuDYTTTfpFbEwI11EIC0Kv1BHzm8ict X-Received: by 2002:a17:906:7257:: with SMTP id n23mr12947143ejk.412.1619963939273; Sun, 02 May 2021 06:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619963939; cv=none; d=google.com; s=arc-20160816; b=PGFXycHGcMzaAoBKP5+CB3pw7vN0MgOII779eUsIoEIK3draxVt6IoFG/ghwejstOg pbYeiwSiqkzJZJms1tkYIbzleauNfkEl//RaZcdHzLBXSABf1AcSjBSnoMsWUo/eXpiB U4EcHQXtYTKc8OA6938CWsmcF7Fdyl1gZNtj2agnYV73ZKaKrbLeGoXCY2qfQN15+AZp E+b8SnszURG5GsNOJzzZ4j9anfF8hXGgTHt28DKzWUqPvYhs1udxQA5hdTjACx7OV2M6 BgG1EoM88sSlqtMviBxMCbaKlv+RdW1NO66Qzk7olVWt/wPU293iCFbVTh9BxQQbpHqd u9dA== 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:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=rebXJLf9MaCCtF5ndvmkSw7P2f7FW2vqQxk+x4gcOiY=; b=tVap0wH5P9aKADV6yIXxQGi+FiOnfw0EVBKy9+b1K/bcVY+/B2MOuQsh7CZzSNuo6G dGQaOgLUbi3TlBLIEuEuDPMAQIuW9zwvSbi2Ijkq5oMl5ZBsEIzegVq5oIEbSubI+yWM qBsgUHC2B5VdMPuLQPJd7mAtgOoaos8prBjkztSeZf+jULNP5ZoZTL0TwxEeZvtihRYe UwTCRRLaVomoYgzr0IJ2gVXpRItVvx14uFx9vrd8NAn9QjRw7Am/GBa/mCvPuIctRcjx LoCBLs/LCc0EIfeEenUhnOhFdLvZ9CCbv9KSpxLksLjaPLcPdLwQmrsBfk613KkqIiUe WQng== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ccCxqEWD; 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 sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id lj16si8259185ejb.180.2021.05.02.06.58.58; Sun, 02 May 2021 06:58:59 -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 header.s=20161025 header.b=ccCxqEWD; 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 sp=QUARANTINE 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 A29006880FC; Sun, 2 May 2021 16:58:54 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 29264687F69 for ; Sun, 2 May 2021 16:58:48 +0300 (EEST) Received: by mail-qk1-f175.google.com with SMTP id 197so2446032qkl.12 for ; Sun, 02 May 2021 06:58:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=NIzE7O8n8OzYp2aiplOFYv+GmLhlaWF2ZQRyYuxxLxE=; b=ccCxqEWD3rhDl5DwI6zxhOxOvTyic4U9VD367+SUyFpME7vc3jQYw7RpoFEdL2Teb4 7MFotdRgDKZF3V6b2Er9SNfuFhQlxJ4BqLAviEvJchPLkvflHz7pJYGLHN4HqGWWrK4q we3/tTCggiQpZZET2AtGVLkps/pRLx1E9pXsvoIPuUiCZMUTEBXF9L0PryDxnsgFjXmk p88qkMOvswul4ELeKuwBAIqEktUbF3fucz4bziwBtiiA81iyoZyZSSf8/HtOAxk7qxwd CBkgSTsbsS3S2TGD47WX6FRFHz/zwv/rEq3N0jFj1WCqOgJBHE9TT9x4Sh6hJrnpEGqX cNuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=NIzE7O8n8OzYp2aiplOFYv+GmLhlaWF2ZQRyYuxxLxE=; b=jRwgnDYVJkdf07Q0lN4r6y8QLt+FUzNd8XICBprNKXiySdA8aDZq7pyR13gr7sY5Oi UIHiXR96v31yRMAcbDh3bmEaD+uQwr9L233rgWIMylXNIR+E5T/uR1YzqFMS/M2cec+I Zb+2sIn6bHVJHtHRxujcuggrvwwkz8iIgGEdbo4FJBcHcj4ASIrVxx/unhp9JcYnXG9G FIG2sgR1j5Vt6LEA4Xy4RhlgG1ufXcawXgKWQfQFz9YGBkyCvLPCvMd2WDIoYkxSRyxJ iX7w76YuxQG7HFoa3RasLHn/WQQz4wDGAikrHEKjYVZPt+6arMIslPUWuNsVIoUsunYE RZIw== X-Gm-Message-State: AOAM532qPpp4nt3esEAw39gHeJqkL0SbGdKFIdltVeuIBpnoIJTLg/2z C/dOGuZqaBjHJrX0T0QaxiDQlLenpb0= X-Received: by 2002:a05:620a:133b:: with SMTP id p27mr7622992qkj.354.1619963926604; Sun, 02 May 2021 06:58:46 -0700 (PDT) Received: from localhost.localdomain ([191.83.208.172]) by smtp.gmail.com with ESMTPSA id e17sm4704427qto.59.2021.05.02.06.58.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 06:58:46 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 2 May 2021 10:58:17 -0300 Message-Id: <20210502135819.53794-1-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] avformat/dv: stop using av_init_packet() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: X1nokVWlfb2k Signed-off-by: James Almer --- libavformat/dv.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index cbb38cbd7d..d7909683c3 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -40,12 +40,22 @@ #include "dv.h" #include "libavutil/avassert.h" +// Must be kept in sync with AVPacket +struct DVPacket { + int64_t pts; + uint8_t *data; + int size; + int stream_index; + int flags; + int64_t pos; +}; + struct DVDemuxContext { const AVDVProfile* sys; /* Current DV profile. E.g.: 525/60, 625/50 */ AVFormatContext* fctx; AVStream* vst; AVStream* ast[4]; - AVPacket audio_pkt[4]; + struct DVPacket audio_pkt[4]; uint8_t audio_buf[4][8192]; int ach; int frames; @@ -261,11 +271,12 @@ static int dv_extract_audio_info(DVDemuxContext *c, const uint8_t *frame) c->ast[i]->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; c->ast[i]->codecpar->codec_id = AV_CODEC_ID_PCM_S16LE; - av_init_packet(&c->audio_pkt[i]); c->audio_pkt[i].size = 0; c->audio_pkt[i].data = c->audio_buf[i]; c->audio_pkt[i].stream_index = c->ast[i]->index; c->audio_pkt[i].flags |= AV_PKT_FLAG_KEY; + c->audio_pkt[i].pts = AV_NOPTS_VALUE; + c->audio_pkt[i].pos = -1; } c->ast[i]->codecpar->sample_rate = dv_audio_frequency[freq]; c->ast[i]->codecpar->channels = 2; @@ -358,7 +369,13 @@ int avpriv_dv_get_packet(DVDemuxContext *c, AVPacket *pkt) for (i = 0; i < c->ach; i++) { if (c->ast[i] && c->audio_pkt[i].size) { - *pkt = c->audio_pkt[i]; + pkt->size = c->audio_pkt[i].size; + pkt->data = c->audio_pkt[i].data; + pkt->stream_index = c->audio_pkt[i].stream_index; + pkt->flags = c->audio_pkt[i].flags; + pkt->pts = c->audio_pkt[i].pts; + pkt->pos = c->audio_pkt[i].pos; + c->audio_pkt[i].size = 0; size = pkt->size; break; @@ -404,7 +421,6 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, /* Now it's time to return video packet */ size = dv_extract_video_info(c, buf); - av_init_packet(pkt); pkt->data = buf; pkt->pos = pos; pkt->size = size; From patchwork Sun May 2 13:58:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27557 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a11:cc:0:0:0:0 with SMTP id m12csp1249649pxt; Sun, 2 May 2021 06:59:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcbc0XobUx35EaovtlNTcPcxNSn8eEhKmV+3c8RdPzVb7qpPfz70oH1MdplxKvJBuNkd5I X-Received: by 2002:a17:906:d969:: with SMTP id rp9mr2713818ejb.516.1619963948685; Sun, 02 May 2021 06:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619963948; cv=none; d=google.com; s=arc-20160816; b=N2+kI9ThLB1AbwXBANNh9Q/uEuuJ6YAwTolcBbvkW+fpUvSy/hgCKZ00pDlMnBPY4g RQgGYZSGXExFxTFEc9NKnruJAHGZR5QngFeJx64Ff7PbbdmHhlDDe+UiNDtvScQnJDsx 4vwIsz0t497cYdCWdaC2NOVB7GX4JKGC+CMQlLBck/09br2kG5loGc+fAnI8LKQLJE91 SyHGxoh9Bd3FTg9YRAI0At35NNGJN69p7mo/olU9Cp/c8iLkpE3bheYzwt/8kn4s9b2R OHgozTdnifXgS8f9FHyPWPZ2o17QAMqR02GMsrhFmCautm2wNlsnkuqTZsZIiSuEnk04 HO6g== 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:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=dc06mpxpPh6k5uFEHAujCAHN9w+fzofaQO+pne1NW90=; b=Ru/1ja5SdahaynC73Lw0j1e59gbCfihWWRe6+MEKNjDEwAV2MgNmirRFdAjeYg3u9e Koi2hyEQf3+BM6BY74OxEgsxIHQFSuoLkgZyV6VrbOp7dQ859zsVkQav6UrKVekU2i8C vVnGE0grllYxWlY33/+kHCAAkOKja6y6fGDDM3ZPFlXRhT4Kj7Oe3V+KTKSmN/DSj0DU mO8hynIxfgAZTAgHu0FUv8TJ/zstpb1cECi2+8npGBAUwhZ3BafMYMtbU/4lUBrAWH+P 45KlEPUX11sZ5u4+Fwjb2iLdcW1+6DGr7h72lVKXW1wtoSAFxFj/VJvPUt3ncZ0ZYPKQ nQ9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ASU3Pk7D; 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 sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a42si8780519edf.438.2021.05.02.06.59.08; Sun, 02 May 2021 06:59:08 -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 header.s=20161025 header.b=ASU3Pk7D; 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 sp=QUARANTINE 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 C77D268837C; Sun, 2 May 2021 16:58:55 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6E5F268837C for ; Sun, 2 May 2021 16:58:49 +0300 (EEST) Received: by mail-qk1-f174.google.com with SMTP id a2so2734510qkh.11 for ; Sun, 02 May 2021 06:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=t+5kxNigoPtwCDuhQrbsYFgow35vU/Q5f/HgTkFaSPA=; b=ASU3Pk7D58A0XKoGLNU9nZwcvlaHWmS/1szOx3Bz9v+6REaOhiQpnlk9TrW3C25IX7 BLD7REIvxzj7W51BZ/TYz7mY+IGQIfo2JrLx7sjglTtgcdcHj9GnDvLY2HEM+VwCpbft NFM5wtQcfycxfSF58btrJvrdBu6QmHsFl3HbVmIY5322mWnDvQqArZ6cXD0LxsXPr9ba hva6Qxnk74rdvBbt7NAKjLRwgtYhRVm+nEGOxl2e50JM+eVUX8sCQue9Pk9YSUP/xL2a q+DRJBf1fxtHBN44wZOwywy15/GdMvy1vx53Nvdne/uj9qJMUxxoDH04M1EQAmz8F+6T fmlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t+5kxNigoPtwCDuhQrbsYFgow35vU/Q5f/HgTkFaSPA=; b=Nh3NmBwE7R16q8Vyi4UQABSaEdSLdInMW6kgc1mY4GYfV1sF4nEn1ijelNM0hTb7Cc GV/52pU95UzRiZvlkBJX/x2rjXrm6OY+Qvjwh4aklA6lyRvnsIGhZ5KILHfdjrHvD6HC VaLN84wcw63f1CWW2vbutwKsiHAKYkmziD8660P5eyPEzAReP2bI6GCA2Eg/whwTZ7VF 8uDFcvpFNzPo+aDO3JAJGwL1JUlXfAy1P/4X+cIslQBr9XvE3DmZlNmCTgRGOSOAeqKw 0AUKDVOi/Eq1uqM3Y+cuoT3z0SUMqK0/Icx8fzWYeKhIoB6dwey+B5PLKvjePJ/uNsn1 y+UQ== X-Gm-Message-State: AOAM531LIW8H+EelsFUeWrIw6lf8jejqicSSZ+v0Sc7+yV7DEmzeyRnf fbEqaspEivpgJBMuht9jvsGAF8EgDoE= X-Received: by 2002:ae9:df82:: with SMTP id t124mr14291396qkf.267.1619963927748; Sun, 02 May 2021 06:58:47 -0700 (PDT) Received: from localhost.localdomain ([191.83.208.172]) by smtp.gmail.com with ESMTPSA id e17sm4704427qto.59.2021.05.02.06.58.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 06:58:47 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 2 May 2021 10:58:18 -0300 Message-Id: <20210502135819.53794-2-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210502135819.53794-1-jamrial@gmail.com> References: <20210502135819.53794-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] avcodec/avi: don't save a copy of the packet's AVBufferRef on DV streams X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: HDc3jG90E7Ak It's no longer needed. Signed-off-by: James Almer --- libavformat/avidec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index d5dcab6193..e0d868e074 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1494,10 +1494,8 @@ resync: } if (CONFIG_DV_DEMUXER && dv_demux) { - AVBufferRef *avbuf = pkt->buf; size = avpriv_dv_produce_packet(avi->dv_demux, pkt, pkt->data, pkt->size, pkt->pos); - pkt->buf = avbuf; pkt->flags |= AV_PKT_FLAG_KEY; if (size < 0) av_packet_unref(pkt); From patchwork Sun May 2 13:58:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27554 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a11:cc:0:0:0:0 with SMTP id m12csp1249717pxt; Sun, 2 May 2021 06:59:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFyrlbouI1XGCu5fyEXE6MjonZzFKIgmdxmplfNxaZQyhm0P372e+zBRvvkjnJQyygGKvn X-Received: by 2002:aa7:cf12:: with SMTP id a18mr15568206edy.160.1619963957533; Sun, 02 May 2021 06:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619963957; cv=none; d=google.com; s=arc-20160816; b=LsTUzF73MRGdJ+rvq1QJ9mXnZXJJNfKOFX7ndsmXUi8jYQ64UMCiGSH9FSp98sH9qi MDf3SugWv2EcgW+DzELmVXWfNvCmjFFR7rWRbWrnbPBit0WSqigyMlrBaoY+q4Nsdpcm 6Sr9SvdrA1tyuCLGtAJgH8qV3opsW2+pbBk7A/UZJxHWyh0sCy/NY/DHeSi4WzW5AWoD tgGx486EhwqmXMTau9CaB3yrGpb/ohcKpC70LqeWICJQ0aU9TrcO8e8bfX7mlg6Nk/Lm Jy8ssD/0+zv6vvOn6ePnhkrlIBuB1j2EIhW8z8zG5LMOQ42c+CQZ+Ryy3sSZS2X4d/y9 A6rA== 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:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=csIB85a/jYea70YIY/Kv1KoDFEQTbSSmOGaCIXG7qb4=; b=HBAzOI4a/twvhZglXRY3KAwnmBbOSNbdZyVdcucmFqYcwv5bNUhbUhj1oxaC69G0pq gwROaUro/OhXscYjfIIX9C2xjr3/JKXSBgEfBHS+nR1Yct6SJS85rGKfd6LQDshFS1BD qpVpa1fBC2Nm6oqVZDBgyQHHci0CMRzc+vl8PaBJjmVsSVFkxFtyvC0NVK2j3V9HjDFQ i0Fd2oKF2qSfnL9vxJwf/n7qS1d7JGxwiU8BXdIyHA0SFKg9hinqNzGVOxew3wXLR9iJ U1At0MYk3FD11BQSB9hQG3SIqcEUchV0FbCYYhs1Fzd5XGrI4x1xAD/s8pg4ShxCiace wURw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=nAySnIXS; 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 sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l7si7679609ejd.455.2021.05.02.06.59.17; Sun, 02 May 2021 06:59:17 -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 header.s=20161025 header.b=nAySnIXS; 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 sp=QUARANTINE 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 E5568688385; Sun, 2 May 2021 16:58:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 389BC68834B for ; Sun, 2 May 2021 16:58:50 +0300 (EEST) Received: by mail-qk1-f173.google.com with SMTP id a2so2734538qkh.11 for ; Sun, 02 May 2021 06:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=e4tj4bGhWdCXcs52NLXP8aVpjPS923833Ag60ASpSJk=; b=nAySnIXS8NC/AWOnDlkhug9rh+JXl5qF/0OOAiLmRjHwZYxKGNaBpGnmp/v3glXhjh s6apQK7N14Iu3YehdTmNp3rhRzaOqHm49HQGGWB5Sd5YNAA4BmJQBGp+HRMRGsVjoQRv O71iduMWix1r9pRmiwlfXL47s+d2wavvPNG2FGt5kqhN5cFfbXfejuMj4MDxBqZ6zF3a 1WpwtvvFjw5seUwERdyOzBK6AWfjy/Cwbe8Jbt+D82DG6e+iCWtpZ+vwDxkij/QIxlX7 IjIjoyqJWlHS078TA8fQlkXuH7s7HvDRyqxJwXXVeRwxE6dpeOeSa4mSEbsaiD+nvwGb NDJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e4tj4bGhWdCXcs52NLXP8aVpjPS923833Ag60ASpSJk=; b=dZJ7sGwBD2gAvDWl5FEePG5dl6JT/L7snavEAOVCUGFQFxpi8SmaQrUmueql5O/IWs zS/OJEtBXETX5qWeefsAlJQ7Q8rlLQRrfpGy4Yt9Ofgalp59dUUbhjA2kN9y4PoZZ7AU ALi/hasaCSYAeII3Q9YbEJ2mU40CMolvkzz3d5+ALdFjGzBWTYOD2aREDeFwvZxxSeK/ ndLW+nvWl4I7PUrdhi/kTeYRsNp4J+wL8cgDLB5jwmPYBfCohEOK1C3eEYaadypPWbsi JLPj7qPTuBzPmfhFzCGptLO8BQAHkeDVUJefhZRGYoTE8NAOIfFi7KwYvxV0+UBHVskv pY5Q== X-Gm-Message-State: AOAM530s/pzUjwy8Llz2/yPWA96WIWOqnoZo7dxU/kGapgOVfbV3dOQp Xik3GvxyUIGeF9u9ct1t8YyJsQ1sHdU= X-Received: by 2002:a37:7685:: with SMTP id r127mr14119773qkc.359.1619963928885; Sun, 02 May 2021 06:58:48 -0700 (PDT) Received: from localhost.localdomain ([191.83.208.172]) by smtp.gmail.com with ESMTPSA id e17sm4704427qto.59.2021.05.02.06.58.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 06:58:48 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 2 May 2021 10:58:19 -0300 Message-Id: <20210502135819.53794-3-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210502135819.53794-1-jamrial@gmail.com> References: <20210502135819.53794-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/mov: don't save a copy of the packet's AVBufferRef on DV streams X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: 7AOoy+pGYxSQ It's no longer needed. Signed-off-by: James Almer --- libavformat/mov.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index ca8f06c4cd..ca6a0f2db4 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -7930,9 +7930,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) } #if CONFIG_DV_DEMUXER if (mov->dv_demux && sc->dv_audio_container) { - AVBufferRef *buf = pkt->buf; ret = avpriv_dv_produce_packet(mov->dv_demux, pkt, pkt->data, pkt->size, pkt->pos); - pkt->buf = buf; av_packet_unref(pkt); if (ret < 0) return ret;