]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/options.c
avisynth: Use RTLD_LOCAL instead of RTLD_GLOBAL
[ffmpeg] / libavformat / options.c
index 3399dd43977366759677d70d9f5e9c142b36b1fb..ad4700465137e63503784ef84e790fa6bec68130 100644 (file)
@@ -19,6 +19,7 @@
  */
 #include "avformat.h"
 #include "avio_internal.h"
+#include "internal.h"
 #include "libavutil/opt.h"
 
 /**
@@ -79,7 +80,7 @@ static const AVClass *format_child_class_next(const AVClass *prev)
 static const AVClass av_format_context_class = {
     .class_name     = "AVFormatContext",
     .item_name      = format_to_name,
-    .option         = options,
+    .option         = avformat_options,
     .version        = LIBAVUTIL_VERSION_INT,
     .child_next     = format_child_next,
     .child_class_next = format_child_class_next,
@@ -100,6 +101,14 @@ AVFormatContext *avformat_alloc_context(void)
     ic = av_malloc(sizeof(AVFormatContext));
     if (!ic) return ic;
     avformat_get_context_defaults(ic);
+    ic->offset = AV_NOPTS_VALUE;
+
+    ic->internal = av_mallocz(sizeof(*ic->internal));
+    if (!ic->internal) {
+        avformat_free_context(ic);
+        return NULL;
+    }
+
     return ic;
 }