提交 fdda8326 编写于 作者: L Limin Wang

avformat/hlsenc: fix av_bprint_finalize() usage

Don't need to do double check by the description of the API.
Reviewed-by: NNicolas George <george@nsup.org>
Signed-off-by: NLimin Wang <lance.lmwang@gmail.com>
上级 db92efd8
......@@ -398,7 +398,7 @@ static int replace_str_data_in_filename(char **s, const char *filename, char pla
av_bprint_finalize(&buf, NULL);
return AVERROR(ENOMEM);
}
if ((ret = av_bprint_finalize(&buf, &new_filename)) < 0 || !new_filename)
if ((ret = av_bprint_finalize(&buf, &new_filename)) < 0)
return ret;
*s = new_filename;
return found_count;
......@@ -448,7 +448,7 @@ static int replace_int_data_in_filename(char **s, const char *filename, char pla
av_bprint_finalize(&buf, NULL);
return AVERROR(ENOMEM);
}
if ((ret = av_bprint_finalize(&buf, &new_filename)) < 0 || !new_filename)
if ((ret = av_bprint_finalize(&buf, &new_filename)) < 0)
return ret;
*s = new_filename;
return found_count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册