avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols

Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.

This breaks API.
This commit is contained in:
Stefano Sabatini
2011-04-15 16:42:09 +02:00
committed by Anton Khirnov
parent 490a022d86
commit 59d96941f0
25 changed files with 65 additions and 66 deletions

View File

@ -233,7 +233,7 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
port = 80; // default mmsh protocol port
ff_url_join(httpname, sizeof(httpname), "http", NULL, host, port, path);
if (ffurl_alloc(&mms->mms_hd, httpname, AVIO_RDONLY) < 0) {
if (ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ) < 0) {
return AVERROR(EIO);
}
@ -261,7 +261,7 @@ static int mmsh_open(URLContext *h, const char *uri, int flags)
// close the socket and then reopen it for sending the second play request.
ffurl_close(mms->mms_hd);
memset(headers, 0, sizeof(headers));
if (ffurl_alloc(&mms->mms_hd, httpname, AVIO_RDONLY) < 0) {
if (ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ) < 0) {
return AVERROR(EIO);
}
stream_selection = av_mallocz(mms->stream_num * 19 + 1);