On 2012-06-15 20:04:44 +0200, Anton Khirnov wrote:
> This can easily happen when the caller is using a custom AVIOContext.
> 
> Behave as if the filename was an empty string in this case.
> ---
>  libavformat/utils.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index d7ba5a7..5450dc4 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -557,7 +557,7 @@ int avformat_open_input(AVFormatContext **ps, const char 
> *filename, AVInputForma
>      }
>  
>      s->duration = s->start_time = AV_NOPTS_VALUE;
> -    av_strlcpy(s->filename, filename, sizeof(s->filename));
> +    av_strlcpy(s->filename, filename ? filename : "", sizeof(s->filename));
>  
>      /* allocate private data */
>      if (s->iformat->priv_data_size > 0) {
> -- 

ok, please cc libav-stable

Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to