From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D3B40481B8 for ; Thu, 11 Jan 2024 22:24:22 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3EF5668D067; Fri, 12 Jan 2024 00:24:19 +0200 (EET) Received: from mail-yw1-f227.google.com (mail-yw1-f227.google.com [209.85.128.227]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A826468CE23 for ; Fri, 12 Jan 2024 00:24:12 +0200 (EET) Received: by mail-yw1-f227.google.com with SMTP id 00721157ae682-5f69383e653so61982647b3.1 for ; Thu, 11 Jan 2024 14:24:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proxyid.net; s=google; t=1705011851; x=1705616651; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ofnz89Q8UDCQwPn/2GhqnLkQAX+wKS9J8OL6FiQCoPk=; b=fy7I54Yq+UgzkQXIHtwW273l0Qdu3ZjZiXbq0AGGOLia1JLOHTtT8hnWMkljmCUS1d 7WAlVTJeDk91VWSzAMsVuOgS/4Wm5kANVPI90io/VzKTADxGFboCBDvYYjyekPkrgDOl BmfP3NWklx+D6kWgkBbjJN1Hk1XXGLvwOCZGQ2NYtqtiaxeUEbDjSA7swziWFLHUlMS2 Ig+4S9BbH4cHTMQvs5ycPlq5X40P6fV7H22KLK0zO+xNLeaRnlw6oG9XDC2XB66rtKpZ 8VRYQOp0OtSi9sUCus0k576cQ4NUbM80SCgciDkYJtpccnxiiQZFcaoX0mWMViBvWn9v EV4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705011851; x=1705616651; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ofnz89Q8UDCQwPn/2GhqnLkQAX+wKS9J8OL6FiQCoPk=; b=nmjeumhUoCWlmc3C6gN165HkN7kHrhaZ6lW+WsVdfFCLb3O/wJWM/xL2PJphiO9ihk cVam/5l9Lq4auUepT9ItHKiFqGSX8Y4tZz4ojwHr7aG+JRU6i+xZhFAlI0ePnjK3oET+ P0Gdq3W1JjGXlfSvf2rvnO7+HKls29tSUAvDyfpE/f2y9RFIan196Ik41I32wZStKF6P gJDIViITEHu6AR6QFw/UvKICJIElWNkWrHJePed5QaPzLX7p0hokZ22gddlcardViNOT NFhttTwlEuEqyJ210iRsMfZGbXclIcriU/j2F5jFEc1GmePq4qT4uNM1L7gmIhpRFmXY BQPA== X-Gm-Message-State: AOJu0Yzytw1KmHr9MbGsQ1hBfyqsKO9RwaewfAo9EsDr0RB+so8GKDYU YOLl6OrPa1534d1PuVnoXtvzRE7IV/8z1wP0ZGgZGYnxZjjFq3lX+K4j5/cAfMhewg== X-Google-Smtp-Source: AGHT+IEEneMBT2VycsL6bKircvfgObB3QX2pepldnxilMaT/8qqOOgWSmaDgnLJQY+yoZMJyejVKY6PhVocB X-Received: by 2002:a81:b60c:0:b0:5e6:11b5:178a with SMTP id u12-20020a81b60c000000b005e611b5178amr466843ywh.77.1705011851021; Thu, 11 Jan 2024 14:24:11 -0800 (PST) Received: from wsx-cc1-001.. (c-76-141-0-17.hsd1.il.comcast.net. [76.141.0.17]) by smtp-relay.gmail.com with ESMTPS id k7-20020a81de07000000b005f79ee02b78sm56671ywj.28.2024.01.11.14.24.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 14:24:11 -0800 (PST) X-Relaying-Domain: proxyid.net From: Marth64 To: ffmpeg-devel@ffmpeg.org Date: Thu, 11 Jan 2024 16:23:00 -0600 Message-Id: <20240111222259.2322271-1-marth64@proxyid.net> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] libavformat/hls: use avio_flush() to clear playlist buffer 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 Cc: Marth64 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Felt that this could be handled by avio_flush(). Traced the code and it seems logical. Seems to work fine for the only sample I have right now. But curious to others opinion. Signed-off-by: Marth64 --- libavformat/hls.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index a69430a457..8dabe86fb8 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2495,9 +2495,7 @@ static int hls_read_seek(AVFormatContext *s, int stream_index, av_packet_unref(pls->pkt); pb->eof_reached = 0; /* Clear any buffered data */ - pb->buf_end = pb->buf_ptr = pb->buffer; - /* Reset the pos, to let the mpegts demuxer know we've seeked. */ - pb->pos = 0; + avio_flush(pb); /* Flush the packet queue of the subdemuxer. */ ff_read_frame_flush(pls->ctx); -- 2.34.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".