[FFmpeg-devel] av_open_input_file

Fabrizio Milo aka misto mistobaan
Sat Dec 11 01:43:04 CET 2010


Then the patch is much easier:

diff --git a/libavformat/avio.c b/libavformat/avio.c
index 9a4d735..33e6e58 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -190,7 +190,7 @@ int url_alloc(URLContext **puc, const char
*filename, int flags)
         up = up->next;
     }
     *puc = NULL;
-    return AVERROR(ENOENT);
+    return AVERROR(ENOSYS);
 }

 int url_open(URLContext **puc, const char *filename, int flags)

I would go with ENOSYS: operation not supported.

ENOENT will and should be returned by the protocol->open() function

We are allocating memory here not validating the data itself.



More information about the ffmpeg-devel mailing list