diff options
author | Steven Liu <lq@chinaffmpeg.org> | 2017-05-11 05:15:08 +0300 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2017-05-11 05:15:08 +0300 |
commit | 7355c1dda2f8f21f699e720700c26dc8a666c6ec (patch) | |
tree | 10088e3116bbbdbd5dd2239d873da2f2b523af93 /libavformat | |
parent | c0ece1f4addf8ac31df95775a2d36be2a55fc759 (diff) |
avformat/hlsenc: move old_filename free operation earlier
Suggested-by: Aaron Levinson <alevinsn@aracnet.com>
Reviewed-by: Aaron Levinson <alevinsn@aracnet.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/hlsenc.c | 3 |
1 files changed, 1 insertions, 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; } } |