Mercurial > mplayer.hg
changeset 36357:7dca7d4d4e54
Add support for -rtsp-stream-over-tcp and -rtsp-stream-over-http for FFmpeg.
author | reimar |
---|---|
date | Sat, 21 Sep 2013 15:55:28 +0000 |
parents | 7bb6989c97b8 |
children | d53606fdb693 |
files | libmpdemux/demux_lavf.c |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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);