[MPlayer-cvslog] r36453 - trunk/libmpdemux/demux_lavf.c

reimar subversion at mplayerhq.hu
Sat Sep 21 17:55:28 CEST 2013


Author: reimar
Date: Sat Sep 21 17:55:28 2013
New Revision: 36453

Log:
Add support for -rtsp-stream-over-tcp and -rtsp-stream-over-http for FFmpeg.

Modified:
   trunk/libmpdemux/demux_lavf.c

Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	Sat Sep 21 17:43:45 2013	(r36452)
+++ trunk/libmpdemux/demux_lavf.c	Sat Sep 21 17:55:28 2013	(r36453)
@@ -535,6 +535,9 @@ static demuxer_t* demux_open_lavf(demuxe
             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 @@ static demuxer_t* demux_open_lavf(demuxe
     }
     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);
 


More information about the MPlayer-cvslog mailing list