From patchwork Sun Dec 1 05:21:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 16503 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 0D6644486E6 for ; Sun, 1 Dec 2019 07:22:15 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D7F1968A6EE; Sun, 1 Dec 2019 07:22:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4386268A6EE for ; Sun, 1 Dec 2019 07:22:08 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id c14so15264690wrn.7 for ; Sat, 30 Nov 2019 21:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zvtuYEnmtw8U7otTtWYF2ftlGM15t17w02qDxwreHh0=; b=GkhB+nky7eYfLGKuapZEIe//U2OKwpOc0cn/SHO1Em9slZh/F8rDAa6tZ/iYYWJRqw NKNQ2l4P0aPt3arnDdBffJ5SsXGL0MjouYwGxxR0CjazvgJqFM0iONKFEVZv1Yb6yB8I /HE7D9JgD/9X23VULOnWkuqPcbRtbApLyV9Z5Gh429Xhft1/LcauEeXt2mIXqAFbQYiv GH2HrgPr3uCOkULg8+2FqBwhabnbQXl2gw7xf8rlq368ZODzEEC+oYtMbS8xhgz25eup bPXkbBK8WyNoWFnlWN+W8VyNmfNyGFNw4kJaHnLv6oKlMM6kMwKX2CZQR42Z8dAaO7yM aVkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zvtuYEnmtw8U7otTtWYF2ftlGM15t17w02qDxwreHh0=; b=f7uDyutd0cOEcn0IZoy8wcL3z/0XZors5RNZLHd8f/Q+aE0JwxeHMPwmJGg9xGwXMY WInpTZ2N93+KTuGWha2xVgm6MZHp4wOsiiJcIixonIKWXSeU2i+o3ObngTYPYF+xUFnz OlhHlZXNtfvxq36VidzhHQsvdeFDCrtOr0bTl1ZKOWxl6Au0qucOQ9QDJ/vX9ftqBsTv xHjbjIqi2FHEinYCNVlActQoU7KyTmi5RLlDqIf4N/33eFF4d8Ty0X+kMo5umjWSmdDG 8Fcin8KFBi/KN2ZG5M2CT6aLAvqZNkovMJ6mThmtBi8Snl/lSjEuoLFW4bPXIFkgXG/p xbgA== X-Gm-Message-State: APjAAAVhNvoLa4ieW0lx/3Z/YXpAoFuNzmg8IuZP1oF9lUc+DHkFR90W 2nr9WwPrhR6Cil6+RfC0dNrpCI+I X-Google-Smtp-Source: APXvYqz/0uFkUA0ewaEsRQySBF/HYsksJjeX4+CAIChVTUEYhjz5hh9fJrigyNX3qlb2E9PRNon+Vg== X-Received: by 2002:adf:8297:: with SMTP id 23mr16135677wrc.379.1575177727493; Sat, 30 Nov 2019 21:22:07 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc08e23.dynamic.kabel-deutschland.de. [188.192.142.35]) by smtp.gmail.com with ESMTPSA id h127sm748098wme.31.2019.11.30.21.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Nov 2019 21:22:06 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 1 Dec 2019 06:21:56 +0100 Message-Id: <20191201052157.10316-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/hls: Use av_packet_move_ref() for packet ownership transfer 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: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Rheinhardt --- libavformat/hls.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 21353bbad7..f60396f246 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2201,9 +2201,8 @@ static int hls_read_packet(AVFormatContext *s, AVPacket *pkt) ist = pls->ctx->streams[pls->pkt.stream_index]; st = pls->main_streams[pls->pkt.stream_index]; - *pkt = pls->pkt; + av_packet_move_ref(pkt, &pls->pkt); pkt->stream_index = st->index; - reset_packet(&c->playlists[minplaylist]->pkt); if (pkt->dts != AV_NOPTS_VALUE) c->cur_timestamp = av_rescale_q(pkt->dts,