]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/options.c
avpacket: Deprecate av_dup_packet
[ffmpeg] / libavformat / options.c
index ad4700465137e63503784ef84e790fa6bec68130..a6fbbd262361a3302622e62d1ae534d52102cf79 100644 (file)
@@ -20,6 +20,8 @@
 #include "avformat.h"
 #include "avio_internal.h"
 #include "internal.h"
+
+#include "libavutil/internal.h"
 #include "libavutil/opt.h"
 
 /**
@@ -27,7 +29,9 @@
  * Options definition for AVFormatContext.
  */
 
+FF_DISABLE_DEPRECATION_WARNINGS
 #include "options_table.h"
+FF_ENABLE_DEPRECATION_WARNINGS
 
 static const char* format_to_name(void* ptr)
 {
@@ -55,7 +59,7 @@ static const AVClass *format_child_class_next(const AVClass *prev)
     AVOutputFormat *ofmt = NULL;
 
     if (!prev)
-        return &ffio_url_class;
+        return &ff_avio_class;
 
     while ((ifmt = av_iformat_next(ifmt)))
         if (ifmt->priv_class == prev)
@@ -101,13 +105,13 @@ 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;
     }
+    ic->internal->offset = AV_NOPTS_VALUE;
 
     return ic;
 }