* and 'playpath' is a file name (the rest of the path,
* may be prefixed with "mp4:")
*/
-static int rtmp_open(URLContext *s, const char *uri, int flags)
+static int rtmp_open(URLContext *s, const char *uri, int flags, AVDictionary **opts)
{
RTMPContext *rt = s->priv_data;
char proto[8], hostname[256], path[1024], auth[100], *fname;
char *old_app, *qmark, *n, fname_buffer[1024];
uint8_t buf[2048];
int port;
- AVDictionary *opts = NULL;
int ret;
if (rt->listen_timeout > 0)
}
if (!strcmp(proto, "rtmpt") || !strcmp(proto, "rtmpts")) {
if (!strcmp(proto, "rtmpts"))
- av_dict_set(&opts, "ffrtmphttp_tls", "1", 1);
+ av_dict_set(opts, "ffrtmphttp_tls", "1", 1);
/* open the http tunneling connection */
ff_url_join(buf, sizeof(buf), "ffrtmphttp", NULL, hostname, port, NULL);
ff_url_join(buf, sizeof(buf), "tls", NULL, hostname, port, NULL);
} else if (!strcmp(proto, "rtmpe") || (!strcmp(proto, "rtmpte"))) {
if (!strcmp(proto, "rtmpte"))
- av_dict_set(&opts, "ffrtmpcrypt_tunneling", "1", 1);
+ av_dict_set(opts, "ffrtmpcrypt_tunneling", "1", 1);
/* open the encrypted connection */
ff_url_join(buf, sizeof(buf), "ffrtmpcrypt", NULL, hostname, port, NULL);
reconnect:
if ((ret = ffurl_open_whitelist(&rt->stream, buf, AVIO_FLAG_READ_WRITE,
- &s->interrupt_callback, &opts,
+ &s->interrupt_callback, opts,
s->protocol_whitelist, s->protocol_blacklist, s)) < 0) {
av_log(s , AV_LOG_ERROR, "Cannot open connection %s\n", buf);
goto fail;
return 0;
fail:
- av_dict_free(&opts);
+ av_dict_free(opts);
rtmp_close(s);
return ret;
}
\
const URLProtocol ff_##flavor##_protocol = { \
.name = #flavor, \
- .url_open = rtmp_open, \
+ .url_open2 = rtmp_open, \
.url_read = rtmp_read, \
.url_read_seek = rtmp_seek, \
.url_read_pause = rtmp_pause, \