changeset 24855:2c790baff42c

Update to use newer libnemesi, should fix desync, fps guessing may fail now
author lu_zero
date Mon, 29 Oct 2007 18:31:47 +0000
parents 8d8e46de9df6
children 4365a0d7a4b8
files configure libmpdemux/demux_nemesi.c
diffstat 2 files changed, 5 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sun Oct 28 22:32:20 2007 +0000
+++ b/configure	Mon Oct 29 18:31:47 2007 +0000
@@ -6238,7 +6238,7 @@
 echocheck "Nemesi Streaming Media libraries"
 if test "$_nemesi" = auto  && test "$_network" = yes ; then
     _nemesi=no
-    if $_pkg_config libnemesi --atleast-version=0.6.2 ; then
+    if $_pkg_config libnemesi --atleast-version=0.6.3 ; then
         _ld_extra="$_ld_extra `$_pkg_config --libs libnemesi`"
         _nemesi=yes
     fi
--- a/libmpdemux/demux_nemesi.c	Sun Oct 28 22:32:20 2007 +0000
+++ b/libmpdemux/demux_nemesi.c	Mon Oct 29 18:31:47 2007 +0000
@@ -43,7 +43,7 @@
                                         rtp_buff * buff, unsigned int * fps)
 {
     extern float force_fps;
-    rtp_ssrc *ssrc;
+    rtp_ssrc *ssrc = NULL;
     rtsp_ctrl * ctl = ndsd->rtsp;
     rtp_frame * fr = &ndsd->first_pkt[stype];
     rtp_buff trash_buff;
@@ -54,15 +54,8 @@
         buff = &trash_buff;
 
     if ( (buff != NULL) || (fps != NULL) ) {
-        rtp_fill_buffers(rtsp_get_rtp_th(ctl));
-        for (ssrc = rtp_active_ssrc_queue(rtsp_get_rtp_queue(ctl));
-             ssrc;
-             ssrc = rtp_next_active_ssrc(ssrc)) {
-            if (ssrc->rtp_sess == sess) {
-                rtp_fill_buffer(ssrc, fr, buff);
-                break;
-            }
-        }
+        while ( !(ssrc = rtp_session_get_ssrc(sess, ctl)) );
+        rtp_fill_buffer(ssrc, fr, buff);
 
         if ( (force_fps == 0.0) && (fps != NULL) ) {
             rtp_fill_buffers(rtsp_get_rtp_th(ctl));
@@ -184,6 +177,7 @@
                 demux_stream_t* d_video;
                 int fps = 0;
                 rtp_buff buff;
+                memset(&buff, 0, sizeof(rtp_buff));
 
                 mp_msg(MSGT_DEMUX, MSGL_INFO, "Detected as VIDEO stream...\n");