Commit 17d96c15 authored by Steven Liu's avatar Steven Liu

avformat/hlsenc: check av_strdup() return value

Signed-off-by: 's avatarSteven Liu <lq@chinaffmpeg.org>
parent 25f5d67a
......@@ -1886,6 +1886,9 @@ static int parse_variant_stream_mapstring(AVFormatContext *s)
* agroup: is key to specify audio group. A string can be given as value.
*/
p = av_strdup(hls->var_stream_map);
if (!p)
return AVERROR(ENOMEM);
q = p;
while (av_strtok(q, " \t", &saveptr1)) {
q = NULL;
......@@ -2007,6 +2010,9 @@ static int parse_cc_stream_mapstring(AVFormatContext *s)
ClosedCaptionsStream *ccs;
p = av_strdup(hls->cc_stream_map);
if(!p)
return AVERROR(ENOMEM);
q = p;
while (av_strtok(q, " \t", &saveptr1)) {
q = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment