<div dir="ltr">Hi, <div><br></div><div>Sorry I didn't provide enough context. The patch fixes a warning (saying the field is deprecated).</div><div>In the version we currently pull from the contribs, the change is already included.</div><div><br></div><div>Regards,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 16, 2019 at 9:19 AM Steve Lhomme <<a href="mailto:robux4@ycbcr.xyz" target="_blank">robux4@ycbcr.xyz</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">In which libavformat version was this "url" field introduced ? You may <br>
need to support both ways if we support an older lavf version than that.<br>
<br>
On 2019-10-15 19:53, Mehdi Sabwat wrote:<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>
> modules/demux/avformat/mux.c | 12 ++++++------<br>
> 1 file changed, 6 insertions(+), 6 deletions(-)<br>
> <br>
> diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c<br>
> index b9d9c378c8..b8aa73000b 100644<br>
> --- a/modules/demux/avformat/mux.c<br>
> +++ b/modules/demux/avformat/mux.c<br>
> @@ -90,10 +90,6 @@ 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( dummy && strlen(p_mux->p_access->psz_path)<br>
> - >= sizeof (((AVFormatContext *)NULL)->filename) )<br>
> - return VLC_EGENERIC;<br>
> -<br>
> msg_Dbg( p_mux, "using %s %s", AVPROVIDER(LIBAVFORMAT), LIBAVFORMAT_IDENT );<br>
> <br>
> vlc_init_avformat(p_this);<br>
> @@ -127,8 +123,12 @@ int avformat_OpenMux( 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>
> -<br>
> + {<br>
> + size_t size = strlen(p_mux->p_access->psz_path);<br>
> + // Freed by libavformat in avformat_free_context()<br>
> + p_sys->oc->url = av_malloc( size + 1 );<br>
> + memcpy( p_sys->oc->url, p_mux->p_access->psz_path , size + 1 );<br>
> + }<br>
> /* Create I/O wrapper */<br>
> p_sys->io_buffer_size = 10 * 1024 * 1024; /* FIXME */<br>
> p_sys->io_buffer = malloc( p_sys->io_buffer_size );<br>
> -- <br>
> 2.23.0<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><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>