On Sat, Dec 12, 2015 at 3:49 PM, Anton Khirnov <[email protected]> wrote:
> ---
>  libavformat/mux.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/libavformat/mux.c b/libavformat/mux.c
> index 7a51578..b10180e 100644
> --- a/libavformat/mux.c
> +++ b/libavformat/mux.c
> @@ -127,6 +127,20 @@ FF_DISABLE_DEPRECATION_WARNINGS
>  FF_ENABLE_DEPRECATION_WARNINGS
>  #endif
>
> +#if FF_API_LAVF_AVCTX
> +FF_DISABLE_DEPRECATION_WARNINGS
> +        if (st->codecpar->codec_type == AVMEDIA_TYPE_UNKNOWN &&
> +            st->codec->codec_type    != AVMEDIA_TYPE_UNKNOWN) {
> +            av_log(s, AV_LOG_WARNING, "Using AVStream.codec to pass codec "
> +                   "parameters to muxers is deprecated, use 
> AVStream.codecpar "
> +                   "instead.\n");
> +            ret = avcodec_parameters_from_context(st->codecpar, st->codec);
> +            if (ret < 0)
> +                goto fail;
> +        }
> +FF_ENABLE_DEPRECATION_WARNINGS
> +#endif
> +
>          if (!st->time_base.num) {
>              /* fall back on the default timebase values */
>              if (codec->codec_type == AVMEDIA_TYPE_AUDIO && 
> codec->sample_rate)
> --

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

Reply via email to