[FFmpeg-devel] [PATCH] url_write not defined if muxers are disabled

Gianluigi Tiesi mplayer
Sun Dec 23 20:47:21 CET 2007

I've noticed that url_write in avio.c is referenced even if
muxers are not enabled, but it's not compiled in.

The patch allows to return EIO if someone calls url_fopen/fdopen
in write mode while muxers are disabled


Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
-------------- next part --------------
Index: avio.c
--- avio.c	(revision 11309)
+++ avio.c	(working copy)
@@ -110,9 +110,9 @@
     return ret;
-#if defined(CONFIG_MUXERS) || defined(CONFIG_PROTOCOLS)
 int url_write(URLContext *h, unsigned char *buf, int size)
+#if defined(CONFIG_MUXERS) || defined(CONFIG_PROTOCOLS)
     int ret;
     if (!(h->flags & (URL_WRONLY | URL_RDWR)))
         return AVERROR(EIO);
@@ -121,8 +121,10 @@
         return AVERROR(EIO);
     ret = h->prot->url_write(h, buf, size);
     return ret;
+    return AVERROR(EIO);
 offset_t url_seek(URLContext *h, offset_t pos, int whence)

More information about the ffmpeg-devel mailing list