aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/dashenc.c
diff options
context:
space:
mode:
authorkjeyapal@akamai.com <kjeyapal@akamai.com>2018-11-28 22:36:16 +0530
committerKarthick J <kjeyapal@akamai.com>2018-12-02 19:14:03 +0530
commit6c1e1242012e116e2622ec7a9f56972eaf5c15f8 (patch)
tree86a445307413c96863503763f9198592df43ff50 /libavformat/dashenc.c
parent84c17449ce221c42475403a133e91c7677034c98 (diff)
downloadffmpeg-6c1e1242012e116e2622ec7a9f56972eaf5c15f8.tar.gz
avformat/dashenc: Handled the error from dashenc_io_open()
Diffstat (limited to 'libavformat/dashenc.c')
-rw-r--r--libavformat/dashenc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index af3f0ee167..72c6e5a8e6 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -534,8 +534,12 @@ static void output_segment_list(OutputStream *os, AVIOContext *out, AVFormatCont
snprintf(temp_filename_hls, sizeof(temp_filename_hls), use_rename ? "%s.tmp" : "%s", filename_hls);
set_http_options(&http_opts, c);
- dashenc_io_open(s, &c->m3u8_out, temp_filename_hls, &http_opts);
+ ret = dashenc_io_open(s, &c->m3u8_out, temp_filename_hls, &http_opts);
av_dict_free(&http_opts);
+ if (ret < 0) {
+ av_log(s, AV_LOG_ERROR, "Unable to open %s for writing\n", temp_filename_hls);
+ return;
+ }
for (i = start_index; i < os->nb_segments; i++) {
Segment *seg = os->segments[i];
double duration = (double) seg->duration / timescale;