[FFmpeg-devel] [PATCH] avformat/hlsenc: move old_filename free operation earlier
Aaron Levinson
alevinsn at aracnet.com
Thu May 11 03:52:20 EEST 2017
On 5/10/2017 3:33 AM, Steven Liu wrote:
> Suggested-by: Aaron Levinson <alevinsn at aracnet.com>
> Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> ---
> libavformat/hlsenc.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 221089c..7ed121a 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -1549,14 +1549,13 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
> sls_flag_file_rename(hls, old_filename);
> ret = hls_start(s);
> }
> + av_free(old_filename);
>
> if (ret < 0) {
> - av_free(old_filename);
> return ret;
> }
>
> if ((ret = hls_window(s, 0)) < 0) {
> - av_free(old_filename);
> return ret;
> }
> }
>
LGTM
Aaron Levinson
More information about the ffmpeg-devel
mailing list