ffmpeg | branch: master | Steven Liu <l...@chinaffmpeg.org> | Thu May 11 10:15:08 2017 +0800| [7355c1dda2f8f21f699e720700c26dc8a666c6ec] | committer: Steven Liu
avformat/hlsenc: move old_filename free operation earlier Suggested-by: Aaron Levinson <alevi...@aracnet.com> Reviewed-by: Aaron Levinson <alevi...@aracnet.com> Signed-off-by: Steven Liu <l...@chinaffmpeg.org> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7355c1dda2f8f21f699e720700c26dc8a666c6ec --- libavformat/hlsenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 221089c1be..7ed121a5dd 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; } } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog