[MPlayer-users] [PATCH] demux_open_rtp() does not display SDP parse errors

Arjan Opmeer arjan at opmeer.net
Sun May 9 20:40:02 CEST 2004


Hi,

I've noticed that the function demux_open_rtp() does not display an error
message when the live.com MediaSession fails to initialize because of an SDP
file parse error.

When this happens MPlayer just quits and it looks as if it never really
tried to play the file at all. Very confusing as it had me baffled for
hours... :)

The attached patch does print the error message that gets constructed by the
live.com library but was never shown to the user.


Arjan

-------------- next part --------------
--- MPlayer-1.0pre4/libmpdemux/demux_rtp.cpp	2004-03-19 11:15:41.000000000 +0100
+++ MPlayer-1.0pre4.patched/libmpdemux/demux_rtp.cpp	2004-05-09 19:32:19.000000000 +0200
@@ -172,8 +172,11 @@
 
     // Now that we have a SDP description, create a MediaSession from it:
     MediaSession* mediaSession = MediaSession::createNew(*env, sdpDescription);
-    if (mediaSession == NULL) break;
-
+    if (mediaSession == NULL) {
+       fprintf(stderr, "Failed to create MediaSession: %s\n",
+               env->getResultMsg());
+       break;
+    }
 
     // Create a 'RTPState' structure containing the state that we just created,
     // and store it in the demuxer's 'priv' field, for future reference:


More information about the MPlayer-users mailing list