avformat/protocols: Fix ff_urlcontext_child_class_next()
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 29 Feb 2016 18:04:54 +0000 (19:04 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 29 Feb 2016 18:34:52 +0000 (19:34 +0100)
This fixes -read_ahead_limit

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/protocols.c

index f374970..77cd3a4 100644 (file)
@@ -215,7 +215,7 @@ const AVClass *ff_urlcontext_child_class_next(const AVClass *prev)
     int i;
 
     /* find the protocol that corresponds to prev */
-    for (i = 0; url_protocols[i]; i++) {
+    for (i = 0; prev && url_protocols[i]; i++) {
         if (url_protocols[i]->priv_data_class == prev) {
             i++;
             break;