From patchwork Tue Feb 18 15:22:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mostafa namazi X-Patchwork-Id: 17831 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 D83C944B416 for ; Tue, 18 Feb 2020 17:30:34 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B2232688121; Tue, 18 Feb 2020 17:30:34 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4B01E688121 for ; Tue, 18 Feb 2020 17:30:28 +0200 (EET) Received: by mail-oi1-f194.google.com with SMTP id l136so20487659oig.1 for ; Tue, 18 Feb 2020 07:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=bzFVCjqRqQiXAQs+6KRkAPU0zStCb3IGBT6bf/j4f+s=; b=G9xcD2Edgik09MtCM5ic+XLGAzliMXZc/QcfAwOpJnDyIwRokNujWSyo6gwZ+vgtj5 V1GjHdBwh+B8gSIs1bCerf/LGh0YIAHhL8KZtKzw8np9D8yhQyfcFSMpcvrveeUR6YkK CXYUpzm6qwywOIVDNHhPSWrg3rmu6dq8Luo6hQnVbhpS+1OUbPiFtzIwQRW4nnz/vHHJ XZ6cn48PIktQ1Pc4948tuWBQ0cdiwyBcbz3XyE/0dcYVmg1mpef79czYtxczOdirCA5S P79YGkcm+bnn4OpeB/gDMlDuBAStj4vTMpWXMe8GcFt+Z7WcS5jp57+tCsTn9zvd8+ka TDOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=bzFVCjqRqQiXAQs+6KRkAPU0zStCb3IGBT6bf/j4f+s=; b=fb7uqQDiN60UoHhy6oJhe0Mj5X49oLRLf7k4H1TiHXLCPe8idEYhYI1wH29mjTA9N8 1ILYsyquD00X9j52wSxXVxlNaF/VZLUhqxVRL33Rg6X48QKRPMTIQtkpRRAqaQ319okU DQr+/xT4MYnaelyGOI7C0u5RxnxLh96b3j1XgYG/xzXFAxNJJbhX/7C7+9sUWG4jxBov xyZqsf0FnqxoXwnLh5ltS3EyUJg5uws0ROD2uwU3dJPlIxI97gGq7K1tmZRHHpOu3A6v iv3+1UyOFQpsuquepKaobO692H4tK+khR2N2PcFYPbXnTRKvzAfYu/5XK/yoXEV6kqj0 Tb1w== X-Gm-Message-State: APjAAAXQpSPfY/zTfwyBzba0qHIEL9VMxvyYfEziEZNIZuzuG+EM7t+X hCWBtSieiS2Uy7XuWkG+mJgLjtsSqy5HXGTlhD/GgX74B5Do7g== X-Google-Smtp-Source: APXvYqwY5z1qaoUHm/80jOQxB74ItjsphjY8NzVgJ9/sfEgQwfr6u1+eTcloWmf6O/4adLPcjV7A8tZkG53jfGcLhiQ= X-Received: by 2002:aca:cd46:: with SMTP id d67mr1576052oig.156.1582039376069; Tue, 18 Feb 2020 07:22:56 -0800 (PST) MIME-Version: 1.0 From: Mostafa Namazi fard Date: Tue, 18 Feb 2020 18:52:45 +0330 Message-ID: To: ffmpeg-devel@ffmpeg.org X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] crash fixed: live stream. 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ret = av_read_frame(pls->ctx, &pls->pkt); diff --git a/libavformat/hls.c b/libavformat/hls.c index 1f58e745a7..97b1a1db52 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2110,7 +2110,7 @@ static int hls_read_packet(AVFormatContext *s, AVPacket *pkt) /* Make sure we've got one buffered packet from each open playlist * stream */ if (pls->needed && !pls->pkt.data) { - while (1) { + while (pls->ctx) { int64_t ts_diff; AVRational tb;