]> git.sesse.net Git - ffmpeg/commitdiff
lavc: remove disabled FF_API_ALLOC_CONTEXT cruft.
authorAnton Khirnov <anton@khirnov.net>
Sun, 22 Jan 2012 09:56:42 +0000 (10:56 +0100)
committerAnton Khirnov <anton@khirnov.net>
Fri, 27 Jan 2012 09:38:34 +0000 (10:38 +0100)
libavcodec/avcodec.h
libavcodec/options.c
libavcodec/version.h

index 95458fa3e064a3bbfe116406785fc353b5131a9a..c8fde8d0d06b3a2e764b2b06bab8feeff1f74374 100644 (file)
@@ -3516,22 +3516,6 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
  */
 const char *av_get_profile_name(const AVCodec *codec, int profile);
 
-#if FF_API_ALLOC_CONTEXT
-/**
- * Set the fields of the given AVCodecContext to default values.
- *
- * @param s The AVCodecContext of which the fields should be set to default values.
- * @deprecated use avcodec_get_context_defaults3
- */
-attribute_deprecated
-void avcodec_get_context_defaults(AVCodecContext *s);
-
-/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
- *  we WILL change its arguments and name a few times! */
-attribute_deprecated
-void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
-#endif
-
 /**
  * Set the fields of the given AVCodecContext to default values corresponding
  * to the given codec (defaults may be codec-dependent).
@@ -3543,25 +3527,6 @@ void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
  */
 int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec);
 
-#if FF_API_ALLOC_CONTEXT
-/**
- * Allocate an AVCodecContext and set its fields to default values.  The
- * resulting struct can be deallocated by simply calling av_free().
- *
- * @return An AVCodecContext filled with default values or NULL on failure.
- * @see avcodec_get_context_defaults
- *
- * @deprecated use avcodec_alloc_context3()
- */
-attribute_deprecated
-AVCodecContext *avcodec_alloc_context(void);
-
-/** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
- *  we WILL change its arguments and name a few times! */
-attribute_deprecated
-AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
-#endif
-
 /**
  * Allocate an AVCodecContext and set its fields to default values.  The
  * resulting struct can be deallocated by simply calling av_free().
index 703563c284e6a08292fcd2f7eff6f5cbcecbe213..5024829b82b8127b40d9716c5df29f2d6d6c4b90 100644 (file)
@@ -451,13 +451,6 @@ static const AVClass av_codec_context_class = {
     .child_class_next        = codec_child_class_next,
 };
 
-#if FF_API_ALLOC_CONTEXT
-void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType codec_type){
-    avcodec_get_context_defaults3(s, NULL);
-    s->codec_type = codec_type;
-}
-#endif
-
 int avcodec_get_context_defaults3(AVCodecContext *s, AVCodec *codec){
     memset(s, 0, sizeof(AVCodecContext));
 
@@ -515,26 +508,6 @@ AVCodecContext *avcodec_alloc_context3(AVCodec *codec){
     return avctx;
 }
 
-#if FF_API_ALLOC_CONTEXT
-AVCodecContext *avcodec_alloc_context2(enum AVMediaType codec_type){
-    AVCodecContext *avctx= av_malloc(sizeof(AVCodecContext));
-
-    if(avctx==NULL) return NULL;
-
-    avcodec_get_context_defaults2(avctx, codec_type);
-
-    return avctx;
-}
-
-void avcodec_get_context_defaults(AVCodecContext *s){
-    avcodec_get_context_defaults2(s, AVMEDIA_TYPE_UNKNOWN);
-}
-
-AVCodecContext *avcodec_alloc_context(void){
-    return avcodec_alloc_context2(AVMEDIA_TYPE_UNKNOWN);
-}
-#endif
-
 int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src)
 {
     if (dest->codec) { // check that the dest context is uninitialized
index 68411e23d6fb4c2760040e198462dcbbfdcaf566..f6f1cbcaafa5ddddb2b3c325f7a3ad3e07869a8e 100644 (file)
@@ -41,9 +41,6 @@
 #ifndef FF_API_REQUEST_CHANNELS
 #define FF_API_REQUEST_CHANNELS (LIBAVCODEC_VERSION_MAJOR < 55)
 #endif
-#ifndef FF_API_ALLOC_CONTEXT
-#define FF_API_ALLOC_CONTEXT    (LIBAVCODEC_VERSION_MAJOR < 54)
-#endif
 #ifndef FF_API_AVCODEC_OPEN
 #define FF_API_AVCODEC_OPEN     (LIBAVCODEC_VERSION_MAJOR < 54)
 #endif