diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-06-26 14:34:53 +0200 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-06-26 14:34:53 +0200 |
commit | 69c38d64d745c678f2f596f5932a5121b7aafc07 (patch) | |
tree | 35a4f898c2b5b68474ed3c0a90a3d7d8cdb6af0f /libavcodec/options.c | |
parent | 6988cf2969d777ebac84d241123883357375dc6c (diff) | |
parent | 04fc8e24a091ed1d77d7a3c0cbcfe60baec19a9f (diff) | |
download | ffmpeg-69c38d64d745c678f2f596f5932a5121b7aafc07.tar.gz |
Merge commit '04fc8e24a091ed1d77d7a3c0cbcfe60baec19a9f'
* commit '04fc8e24a091ed1d77d7a3c0cbcfe60baec19a9f':
lavc: deprecate avcodec_get_context_defaults3()
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/options.c')
-rw-r--r-- | libavcodec/options.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libavcodec/options.c b/libavcodec/options.c index a82f3759a3..10dc0558c6 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -89,7 +89,7 @@ static const AVClass av_codec_context_class = { .get_category = get_category, }; -int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec) +static int init_context_defaults(AVCodecContext *s, const AVCodec *codec) { int flags=0; memset(s, 0, sizeof(AVCodecContext)); @@ -146,6 +146,13 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec) return 0; } +#if FF_API_GET_CONTEXT_DEFAULTS +int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec) +{ + return init_context_defaults(s, codec); +} +#endif + AVCodecContext *avcodec_alloc_context3(const AVCodec *codec) { AVCodecContext *avctx= av_malloc(sizeof(AVCodecContext)); @@ -153,7 +160,7 @@ AVCodecContext *avcodec_alloc_context3(const AVCodec *codec) if (!avctx) return NULL; - if(avcodec_get_context_defaults3(avctx, codec) < 0){ + if (init_context_defaults(avctx, codec) < 0) { av_free(avctx); return NULL; } |