# HG changeset patch # User reimar # Date 1379778928 0 # Node ID 7dca7d4d4e547f2d2b24ce62523968e3b3bef9c0 # Parent 7bb6989c97b840de902075cbdc0834aeb5cc25a8 Add support for -rtsp-stream-over-tcp and -rtsp-stream-over-http for FFmpeg. diff -r 7bb6989c97b8 -r 7dca7d4d4e54 libmpdemux/demux_lavf.c --- a/libmpdemux/demux_lavf.c Sat Sep 21 15:43:45 2013 +0000 +++ b/libmpdemux/demux_lavf.c Sat Sep 21 15:55:28 2013 +0000 @@ -535,6 +535,9 @@ mp_msg(MSGT_HEADER,MSGL_ERR, "demux_lavf, couldn't set option analyzeduration to %u\n", opt_analyzeduration); } + if (rtsp_transport_http || rtsp_transport_tcp) + av_dict_set(&opts, "rtsp_transport", rtsp_transport_http ? "http" : "tcp", 0); + if(opt_avopt){ if(av_dict_parse_string(&opts, opt_avopt, "=", ",", 0) < 0){ mp_msg(MSGT_HEADER,MSGL_ERR, "Your options /%s/ look like gibberish to me pal\n", opt_avopt); @@ -570,9 +573,15 @@ } if (av_dict_count(opts)) { AVDictionaryEntry *e = NULL; - while ((e = av_dict_get(opts, "", e, AV_DICT_IGNORE_SUFFIX))) - mp_msg(MSGT_HEADER,MSGL_ERR,"Unknown option %s\n", e->key); - return 0; + int invalid = 0; + while ((e = av_dict_get(opts, "", e, AV_DICT_IGNORE_SUFFIX))) { + if (strcmp(e->key, "rtsp_transport")) { + invalid++; + mp_msg(MSGT_HEADER,MSGL_ERR,"Unknown option %s\n", e->key); + } + } + if (invalid) + return 0; } av_dict_free(&opts);