.get_category = get_category,
};
-#if FF_API_ALLOC_CONTEXT
-void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType codec_type){
- AVCodec c= {0};
- c.type= codec_type;
- avcodec_get_context_defaults3(s, &c);
-}
-#endif
-
int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec)
{
int flags=0;
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 (avcodec_is_open(dest)) { // check that the dest context is uninitialized
dest->codec = NULL;
dest->slice_offset = NULL;
dest->hwaccel = NULL;
- dest->thread_opaque = NULL;
dest->internal = NULL;
/* reallocate values that should be allocated separately */