[FFmpeg-devel] [PATCH 1/2] avformat: add av_stream_get_codec_timebase()
wm4
nfxjfg at googlemail.com
Mon Sep 26 21:22:18 EEST 2016
On Mon, 26 Sep 2016 14:39:12 -0300
James Almer <jamrial at gmail.com> wrote:
> This will allow ffmpeg.c to stop using AVStream.codec in some cases
>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> TODO: Version bump, APIChanges entry.
>
> libavformat/avformat.h | 7 +++++++
> libavformat/utils.c | 10 ++++++++++
> 2 files changed, 17 insertions(+)
>
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index ae70cc8..057f8c5 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -2922,6 +2922,13 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt,
> enum AVTimebaseSource copy_tb);
>
> /**
> + * Get the internal codec timebase from a stream.
> + *
> + * @param st input stream to extract the timebase from
> + */
> +AVRational av_stream_get_codec_timebase(const AVStream *st);
> +
> +/**
> * @}
> */
>
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 3e0f57d..abb5fb9 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -5383,3 +5383,13 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt,
>
> return 0;
> }
> +
> +AVRational av_stream_get_codec_timebase(const AVStream *st)
> +{
> + // See avformat_transfer_internal_stream_timing_info() TODO.
> +#if FF_API_LAVF_AVCTX
> +FF_DISABLE_DEPRECATION_WARNINGS
> + return st->codec->time_base;
> +FF_ENABLE_DEPRECATION_WARNINGS
> +#endif
> +}
So if FF_API_LAVF_AVCTX is finally removed, this function changes its
behavior to launching nethack? I don't get it.
More information about the ffmpeg-devel
mailing list