[FFmpeg-devel] [PATCH v2] avutil/avstring: improve av_strreplace implement
Marton Balint
cus at passwd.hu
Sun Apr 2 22:05:11 EEST 2017
On Mon, 3 Apr 2017, Steven Liu wrote:
> Use AVBprint to implementing av_strreplace
> add av_strreplace TEST_STRREPLACE
Thanks for keeping working on this. Agreeing with Nicolas, I also think it
should be renamed to av_strireplace to reflect its case insensitivity.
Also the patch should be backported to 3.3. as well.
> index 6438dbaede..f86798c69b 100644
> --- a/libavformat/dashdec.c
> +++ b/libavformat/dashdec.c
> @@ -410,8 +410,10 @@ static char *get_content_url(xmlNodePtr *baseurl_nodes, int n_baseurl_nodes, xml
> }
> if (rep_bandwidth_val && tmp_str)
> url = av_strreplace(tmp_str, "$Bandwidth$", (const char*)rep_bandwidth_val);
> +
> if (tmp_str != url)
> av_free(tmp_str);
> +
> return url;
> }
Unrelated whitespace change...
Thanks,
Marton
More information about the ffmpeg-devel
mailing list