diff options
Diffstat (limited to 'libavformat/options.c')
-rw-r--r-- | libavformat/options.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/options.c b/libavformat/options.c index d99f04a..a5646df 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -19,6 +19,7 @@ */ #include "avformat.h" #include "avio_internal.h" +#include "internal.h" #include "libavutil/opt.h" /** @@ -100,6 +101,13 @@ AVFormatContext *avformat_alloc_context(void) ic = av_malloc(sizeof(AVFormatContext)); if (!ic) return ic; avformat_get_context_defaults(ic); + + ic->internal = av_mallocz(sizeof(*ic->internal)); + if (!ic->internal) { + avformat_free_context(ic); + return NULL; + } + return ic; } |