]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/options.c
mpegtsenc: do not reference the deprecated ffmpeg option 'vbsf' in a log message
[ffmpeg] / libavformat / options.c
index 64bc7a89967792eda2564811851ca23bfc7c5e95..2584153b91add0248e1a9ceb4deb661ac56e4c46 100644 (file)
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 #include "avformat.h"
+#include "avio_internal.h"
 #include "libavutil/opt.h"
 
 /**
@@ -40,6 +41,10 @@ static void *format_child_next(void *obj, void *prev)
         ((s->iformat && s->iformat->priv_class) ||
           s->oformat && s->oformat->priv_class))
         return s->priv_data;
+#if !FF_API_OLD_AVIO
+    if (s->pb && s->pb->av_class && prev != s->pb)
+        return s->pb;
+#endif
     return NULL;
 }
 
@@ -48,17 +53,26 @@ static const AVClass *format_child_class_next(const AVClass *prev)
     AVInputFormat  *ifmt = NULL;
     AVOutputFormat *ofmt = NULL;
 
-    while (prev && (ifmt = av_iformat_next(ifmt)))
+    if (!prev)
+#if !FF_API_OLD_AVIO
+        return &ffio_url_class;
+#else
+    prev = (void *)&ifmt; // Dummy pointer;
+#endif
+
+    while ((ifmt = av_iformat_next(ifmt)))
         if (ifmt->priv_class == prev)
             break;
-    if ((prev && ifmt) || (!prev))
+
+    if (!ifmt)
+        while ((ofmt = av_oformat_next(ofmt)))
+            if (ofmt->priv_class == prev)
+                break;
+    if (!ofmt)
         while (ifmt = av_iformat_next(ifmt))
             if (ifmt->priv_class)
                 return ifmt->priv_class;
 
-    while (prev && (ofmt = av_oformat_next(ofmt)))
-        if (ofmt->priv_class == prev)
-            break;
     while (ofmt = av_oformat_next(ofmt))
         if (ofmt->priv_class)
             return ofmt->priv_class;
@@ -102,6 +116,9 @@ static const AVOption options[]={
 {"careful", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, D, "fer"},
 {"explode", "abort decoding on error recognition", 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_EXPLODE }, INT_MIN, INT_MAX, D, "fer"},
 {"fpsprobesize", "number of frames used to probe fps", OFFSET(fps_probe_size), AV_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX-1, D},
+{"audio_preload", "microseconds by which audio packets should be interleaved earlier", OFFSET(audio_preload), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX-1, E},
+{"chunk_duration", "microseconds for each chunk", OFFSET(max_chunk_duration), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX-1, E},
+{"chunk_size", "size in bytes for each chunk", OFFSET(max_chunk_size), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX-1, E},
 {NULL},
 };