<div dir="ltr">It does. Thanks</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 8, 2020 at 7:47 PM Rémi Denis-Courmont <<a href="mailto:remi@remlab.net">remi@remlab.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le keskiviikkona 8. huhtikuuta 2020, 20.38.28 EEST Mehdi Sabwat a écrit :<br>
> From: Mehdi Sabwat <<a href="mailto:mehdisabwat@gmail.com" target="_blank">mehdisabwat@gmail.com</a>><br>
> <br>
> Since Jan 21, 2018 (ea3672b7d67c432724bdbc8de0221f869b6a04c6)<br>
> filename field was deprecated in favor of `url` which now has<br>
> no length restrictions.<br>
> <br>
> ```<br>
> 2018-01-28 - ea3672b7d6 - lavf 58.7.100 - avformat.h<br>
> Deprecate AVFormatContext filename field which had limited length, use the<br>
> new dynamically allocated url field instead.<br>
> ```<br>
> ---<br>
> modules/demux/avformat/mux.c | 8 +++++++-<br>
> 1 file changed, 7 insertions(+), 1 deletion(-)<br>
> <br>
> diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c<br>
> index 9179daf592..383e955c07 100644<br>
> --- a/modules/demux/avformat/mux.c<br>
> +++ b/modules/demux/avformat/mux.c<br>
> @@ -90,8 +90,10 @@ int avformat_OpenMux( vlc_object_t *p_this )<br>
> sout_mux_t *p_mux = (sout_mux_t*)p_this;<br>
> bool dummy = !strcmp( p_mux->p_access->psz_access, "dummy");<br>
> <br>
> +#if (LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 7, 100))<br>
> if( dummy && strlen(p_mux->p_access->psz_path)<br>
> <br>
> >= sizeof (((AVFormatContext<br>
> >*)NULL)->filename) )<br>
> <br>
> +#endif<br>
> return VLC_EGENERIC;<br>
> <br>
> msg_Dbg( p_mux, "using %s %s", AVPROVIDER(LIBAVFORMAT),<br>
> LIBAVFORMAT_IDENT ); @@ -127,7 +129,11 @@ int avformat_OpenMux(<br>
> vlc_object_t *p_this )<br>
> p_sys->oc->oformat = file_oformat;<br>
> /* If we use dummy access, let avformat write output */<br>
> if( dummy )<br>
> - strcpy( p_sys->oc->filename, p_mux->p_access->psz_path );<br>
> +#if (LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(58, 7, 100))<br>
> + p_sys->oc->url = av_strdup(p_mux->p_access->psz_path);<br>
> +#else<br>
> + p_sys->oc->filename = av_strdup(p_mux->p_access->psz_path);<br>
> +#endif<br>
> <br>
> /* Create I/O wrapper */<br>
> p_sys->io_buffer_size = 10 * 1024 * 1024; /* FIXME */<br>
<br>
Uh, doesn't this leak?<br>
<br>
-- <br>
Rémi Denis-Courmont<br>
Hagalund ny stad, Nylands republik<br>
<br>
<br>
<br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a></blockquote></div>