summaryrefslogtreecommitdiff
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
authorSteven Liu <lq@chinaffmpeg.org>2017-12-04 12:03:37 +0800
committerSteven Liu <lq@chinaffmpeg.org>2017-12-04 12:03:37 +0800
commit071f47649ce39897f18ce034dd428067f29d9b66 (patch)
tree730b7777a2b4d6325d075e838894c2481adbd89d /libavformat/hlsenc.c
parent31b351ea81d0a7c0d0ed1982dcc6327b7f43b987 (diff)
avformat/hlsplaylist: add int type of API ff_hls_write_file_entry
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r--libavformat/hlsenc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index dc8bf48791..aeeed5bcd2 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1236,11 +1236,13 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs)
hls->flags & HLS_SINGLE_FILE, en->size, en->pos);
}
- ff_hls_write_file_entry(out, en->discont, byterange_mode,
+ ret = ff_hls_write_file_entry(out, en->discont, byterange_mode,
en->duration, hls->flags & HLS_ROUND_DURATIONS,
en->size, en->pos, vs->baseurl,
en->filename, prog_date_time_p);
-
+ if (ret < 0) {
+ av_log(s, AV_LOG_WARNING, "ff_hls_write_file_entry get error\n");
+ }
}
if (last && (hls->flags & HLS_OMIT_ENDLIST)==0)
@@ -1251,11 +1253,13 @@ static int hls_window(AVFormatContext *s, int last, VariantStream *vs)
goto fail;
ff_hls_write_playlist_header(sub_out, hls->version, hls->allowcache,
target_duration, sequence, PLAYLIST_TYPE_NONE);
-
for (en = vs->segments; en; en = en->next) {
- ff_hls_write_file_entry(sub_out, 0, byterange_mode,
+ ret = ff_hls_write_file_entry(sub_out, 0, byterange_mode,
en->duration, 0, en->size, en->pos,
vs->baseurl, en->sub_filename, NULL);
+ if (ret < 0) {
+ av_log(s, AV_LOG_WARNING, "ff_hls_write_file_entry get error\n");
+ }
}
if (last)