mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
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>
This commit is contained in:
parent
c0ece1f4ad
commit
7355c1dda2
@ -1549,14 +1549,13 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
sls_flag_file_rename(hls, old_filename);
|
sls_flag_file_rename(hls, old_filename);
|
||||||
ret = hls_start(s);
|
ret = hls_start(s);
|
||||||
}
|
}
|
||||||
|
av_free(old_filename);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_free(old_filename);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = hls_window(s, 0)) < 0) {
|
if ((ret = hls_window(s, 0)) < 0) {
|
||||||
av_free(old_filename);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user