Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Zhao <mypopydev@gmail.com>2018-04-09 18:11:02 +0300
committerJun Zhao <jun.zhao@intel.com>2018-04-12 11:04:58 +0300
commit0e49118271ce0a3e8911200824032508b5a7de16 (patch)
treede9b2766e6e84e2a5bc04f129a553832c878b4bd /libavformat/hls.c
parentcdd107b96586916508f8665b08be7de54d9633cf (diff)
lavf/hls: use ff_get_chomp_line
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r--libavformat/hls.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index ae0545a086..1257cd101c 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -216,14 +216,6 @@ typedef struct HLSContext {
AVIOContext *playlist_pb;
} HLSContext;
-static int read_chomp_line(AVIOContext *s, char *buf, int maxlen)
-{
- int len = ff_get_line(s, buf, maxlen);
- while (len > 0 && av_isspace(buf[len - 1]))
- buf[--len] = '\0';
- return len;
-}
-
static void free_segment_list(struct playlist *pls)
{
int i;
@@ -770,7 +762,7 @@ static int parse_playlist(HLSContext *c, const char *url,
if (av_opt_get(in, "location", AV_OPT_SEARCH_CHILDREN, &new_url) >= 0)
url = new_url;
- read_chomp_line(in, line, sizeof(line));
+ ff_get_chomp_line(in, line, sizeof(line));
if (strcmp(line, "#EXTM3U")) {
ret = AVERROR_INVALIDDATA;
goto fail;
@@ -782,7 +774,7 @@ static int parse_playlist(HLSContext *c, const char *url,
pls->type = PLS_TYPE_UNSPECIFIED;
}
while (!avio_feof(in)) {
- read_chomp_line(in, line, sizeof(line));
+ ff_get_chomp_line(in, line, sizeof(line));
if (av_strstart(line, "#EXT-X-STREAM-INF:", &ptr)) {
is_variant = 1;
memset(&variant_info, 0, sizeof(variant_info));