From patchwork Sat May 9 19:15:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 19584 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 0E58B4499FD for ; Sat, 9 May 2020 22:15:45 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E333B689E53; Sat, 9 May 2020 22:15:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6F6D0689DBD for ; Sat, 9 May 2020 22:15:38 +0300 (EEST) Received: by mail-wm1-f65.google.com with SMTP id f134so1428356wmf.1 for ; Sat, 09 May 2020 12:15:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0WSx8O1L2mMw1+HGV0REzcHhmaghgq8hU1oLI3vces8=; b=vMpdpwIerA8+n7XcqM6dIEy7oLZ5OLoaUjwVTDpFE3GhN8MtnnM+ohew51bnU55Gyr AxmP0Win+CT1AaGHZqXf1JDx1B4xOw1uisdj10c5pbd842/PjsS61cqoihhaoNNGSzLG lv9gmeYqGNvbQ5ieumYwhkdhMTU/IlhpfnVHhlbRY9mJMySRnAsJ4kxk8j7RlXlcyOPl tJ+K1fEWV8Mkz0rcY9/zhNeMxWbIcm4RFlrGFxe8QJKQkvOS3EmkvfwRFSBf7uTR7ChU CWgmOYafnet3eYvdQUmXavi8dYf58cXpck6M7AWsTWo2uRZRZoFVrSgmH0Bndk0QYGWk 2B3A== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=0WSx8O1L2mMw1+HGV0REzcHhmaghgq8hU1oLI3vces8=; b=EXGcbDNUyGX/v5noajQhr/rmw4G55tYPIDeh/futnycG5+deEcq9HmdL5W5+3sRlRT 9aAxmJBGpy8Rg4GT810stvGIj+Z9Gr9oXceCiexmdgctcql85vF6xHy/kdAze5ZRpDkn 5L69mciPthoVnZdFdxywp1x6iIISULImNyYCiIVU+6FQCfx4pNkHM6WlqJLZutwIJmEY OUw4ZfSNuRUHgeU+hV86ChWUxag2Jc3lgQl1qB0gXHWw11cnYNzmhScIzjCZ/UuMt7gO PEnxYyDodo8Ob7Di/sUFag4NN9B8/UxidbkKUyBHVQKSBxuBP1Nx6kCixOvyZGDabXUA KZFw== X-Gm-Message-State: AGi0PuZeGgHQQGdVto+l0YR1pRVz7tmS3zTrbGo/IH/8iDqFSWdKY/gY PTRHZoAT06hgXSoSlMrHQNArDkJk X-Google-Smtp-Source: APiQypLa+GyPkM2tPulvwVvBHPHhSfV24wtQtYfaz3R3R5DkTBXA8s6cEvxcCl8M6d3hccqWWY/xjg== X-Received: by 2002:a7b:ce13:: with SMTP id m19mr21460087wmc.76.1589051737597; Sat, 09 May 2020 12:15:37 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1ab57.dynamic.kabel-deutschland.de. [188.193.171.87]) by smtp.gmail.com with ESMTPSA id w9sm10055217wrc.27.2020.05.09.12.15.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 12:15:36 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 9 May 2020 21:15:06 +0200 Message-Id: <20200509191509.9812-3-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200509191509.9812-1-andreas.rheinhardt@gmail.com> References: <20200509191509.9812-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/6] avformat/hlsenc: Don't cast const away 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/hlsenc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index afb4d2a0c0..2a0d17baea 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -525,10 +525,10 @@ static int hls_delete_old_segments(AVFormatContext *s, HLSContext *hls, int ret = 0; int segment_cnt = 0; AVBPrint path; - char *dirname = NULL; + const char *dirname = NULL; char *dirname_r = NULL; char *dirname_repl = NULL; - char *vtt_dirname = NULL; + const char *vtt_dirname = NULL; char *vtt_dirname_r = NULL; const char *proto = NULL; @@ -559,7 +559,7 @@ static int hls_delete_old_segments(AVFormatContext *s, HLSContext *hls, if (segment && !hls->use_localtime_mkdir) { dirname_r = hls->segment_filename ? av_strdup(hls->segment_filename): av_strdup(vs->avf->url); - dirname = (char*)av_dirname(dirname_r); + dirname = av_dirname(dirname_r); } /* if %v is present in the file's directory @@ -598,7 +598,7 @@ static int hls_delete_old_segments(AVFormatContext *s, HLSContext *hls, if ((segment->sub_filename[0] != '\0')) { vtt_dirname_r = av_strdup(vs->vtt_avf->url); - vtt_dirname = (char*)av_dirname(vtt_dirname_r); + vtt_dirname = av_dirname(vtt_dirname_r); av_bprint_clear(&path); av_bprintf(&path, "%s%c%s", vtt_dirname, SEPARATOR,