avformat/hlsenc: check av_strdup() return value
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
parent
25f5d67a31
commit
17d96c15d2
@ -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.
|
* agroup: is key to specify audio group. A string can be given as value.
|
||||||
*/
|
*/
|
||||||
p = av_strdup(hls->var_stream_map);
|
p = av_strdup(hls->var_stream_map);
|
||||||
|
if (!p)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
q = p;
|
q = p;
|
||||||
while (av_strtok(q, " \t", &saveptr1)) {
|
while (av_strtok(q, " \t", &saveptr1)) {
|
||||||
q = NULL;
|
q = NULL;
|
||||||
@ -2007,6 +2010,9 @@ static int parse_cc_stream_mapstring(AVFormatContext *s)
|
|||||||
ClosedCaptionsStream *ccs;
|
ClosedCaptionsStream *ccs;
|
||||||
|
|
||||||
p = av_strdup(hls->cc_stream_map);
|
p = av_strdup(hls->cc_stream_map);
|
||||||
|
if(!p)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
q = p;
|
q = p;
|
||||||
while (av_strtok(q, " \t", &saveptr1)) {
|
while (av_strtok(q, " \t", &saveptr1)) {
|
||||||
q = NULL;
|
q = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user