[FFmpeg-devel] [PATCH v2] avformat/rtmpproto: change rtmp_open from url_open to url_open2
Steven Liu
lq at chinaffmpeg.org
Thu Mar 16 14:31:34 EET 2017
use the option set by user
Reported-by: Lancelot Lai <laihy23 at gmail.com>
Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
---
libavformat/rtmpproto.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 5d7ad79..bbafa77 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -2604,14 +2604,14 @@ static int inject_fake_duration_metadata(RTMPContext *rt)
* 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 **options)
{
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;
+ AVDictionary *opts = *options;
int ret;
if (rt->listen_timeout > 0)
@@ -3141,7 +3141,7 @@ static const AVClass flavor##_class = { \
\
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, \
--
2.10.1 (Apple Git-78)
More information about the ffmpeg-devel
mailing list