#include <string.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/avstring.h"
-#include "libavformat/internal.h"
+#include "internal.h"
#include "mms.h"
#include "asf.h"
#include "http.h"
}
}
}
- return 0;
}
static int mmsh_open(URLContext *h, const char *uri, int flags)
host, sizeof(host), &port, path, sizeof(path), location);
if (port<0)
port = 80; // default mmsh protocol port
- ff_url_join(httpname, sizeof(httpname), "http", NULL, host, port, path);
+ ff_url_join(httpname, sizeof(httpname), "http", NULL, host, port, "%s", path);
- if (ffurl_alloc(&mms->mms_hd, httpname, URL_RDONLY) < 0) {
+ if (ffurl_alloc(&mms->mms_hd, httpname, AVIO_FLAG_READ) < 0) {
return AVERROR(EIO);
}
// 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, URL_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);