On date Monday 2011-04-04 20:43:50 +0200, Anton Khirnov wrote:
> ---
> cmdutils.c | 20 ++++++--------------
> libavformat/avio.c | 2 ++
> libavformat/avio.h | 4 +++-
> 3 files changed, 11 insertions(+), 15 deletions(-)
>
> diff --git a/cmdutils.c b/cmdutils.c
> index 6901f56..bae0514 100644
> --- a/cmdutils.c
> +++ b/cmdutils.c
> @@ -653,20 +653,12 @@ void show_bsfs(void)
>
> void show_protocols(void)
> {
> - URLProtocol *up=NULL;
> -
> - printf("Supported file protocols:\n"
> - "I.. = Input supported\n"
> - ".O. = Output supported\n"
> - "..S = Seek supported\n"
> - "FLAGS NAME\n"
> - "----- \n");
> - while((up = av_protocol_next(up)))
> - printf("%c%c%c %s\n",
> - up->url_read ? 'I' : '.',
> - up->url_write ? 'O' : '.',
> - up->url_seek ? 'S' : '.',
> - up->name);
> + void *opaque = NULL;
> + const char *name;
> +
> + printf("Supported file protocols:\n");
> + while((name = avio_enum_protocols(&opaque)))
> + printf("%s\n", name);
> }
Stupid question, what's wrong with av_protocol_next()?
And why to drop the listing of the protocol features in
show_protocols()?
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel