diff options
author | Björn Axelsson <gecko@acc.umu.se> | 2008-03-10 19:03:39 +0000 |
---|---|---|
committer | Robert Swain <robert.swain@gmail.com> | 2008-03-10 19:03:39 +0000 |
commit | 5acef35f57fb1ec896de0ed572eafa1bf064506a (patch) | |
tree | 66c46a209ec8bdbaab073f12c094c79acb26df5c /libavformat/avio.c | |
parent | 7ce6892373c812e9fff7af2f8107e6ee3d0567b0 (diff) | |
download | ffmpeg-streaming-5acef35f57fb1ec896de0ed572eafa1bf064506a.zip ffmpeg-streaming-5acef35f57fb1ec896de0ed572eafa1bf064506a.tar.gz |
Add AVClass to URLContext at next major version bump
Patch by Björn Axelsson (bjorn axelsson intinor se)
Originally committed as revision 12411 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avio.c')
-rw-r--r-- | libavformat/avio.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libavformat/avio.c b/libavformat/avio.c index 5f5bff1..b6478c4 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -20,6 +20,22 @@ */ #include "avformat.h" #include "avstring.h" +#include "opt.h" + +#if LIBAVFORMAT_VERSION_MAJOR >= 53 +/** @name Logging context. */ +/*@{*/ +static const char *urlcontext_to_name(void *ptr) +{ + URLContext *h = (URLContext *)ptr; + if(h->prot) return h->prot->name; + else return "NULL"; +} +static const AVOption options[] = {{NULL}}; +static const AVClass urlcontext_class = + { "URLContext", urlcontext_to_name, options }; +/*@}*/ +#endif static int default_interrupt_cb(void); @@ -82,6 +98,9 @@ int url_open(URLContext **puc, const char *filename, int flags) err = AVERROR(ENOMEM); goto fail; } +#if LIBAVFORMAT_VERSION_MAJOR >= 53 + uc->av_class = &urlcontext_class; +#endif uc->filename = (char *) &uc[1]; strcpy(uc->filename, filename); uc->prot = up; |