mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avformat/hlsenc: Check ret
Fixes: CID1609624 Unused value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7e577165c1
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9806a37bcf
commit
8cedb04979
@ -2596,9 +2596,11 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
" will retry with a new http session.\n");
|
||||
ff_format_io_close(s, &vs->out);
|
||||
ret = hlsenc_io_open(s, &vs->out, filename, &options);
|
||||
if (ret >= 0) {
|
||||
reflush_dynbuf(vs, &range_length);
|
||||
ret = hlsenc_io_close(s, &vs->out, filename);
|
||||
}
|
||||
}
|
||||
av_dict_free(&options);
|
||||
av_freep(&vs->temp_buffer);
|
||||
av_freep(&filename);
|
||||
@ -2608,6 +2610,9 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
hls_rename_temp_file(s, oc);
|
||||
}
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
old_filename = av_strdup(oc->url);
|
||||
if (!old_filename) {
|
||||
return AVERROR(ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user