[MPlayer-cvslog] r25028 - trunk/libmpdemux/demux_nemesi.c

lu_zero subversion at mplayerhq.hu
Mon Nov 12 17:39:09 CET 2007


Author: lu_zero
Date: Mon Nov 12 17:39:09 2007
New Revision: 25028

Log:
fetch metadata for audio (from amol)

Modified:
   trunk/libmpdemux/demux_nemesi.c

Modified: trunk/libmpdemux/demux_nemesi.c
==============================================================================
--- trunk/libmpdemux/demux_nemesi.c	(original)
+++ trunk/libmpdemux/demux_nemesi.c	Mon Nov 12 17:39:09 2007
@@ -74,12 +74,13 @@ static void link_session_and_fetch_conf(
     rtp_ssrc *ssrc = NULL;
     rtp_frame * fr = &ndsd->first_pkt[stype];
     rtp_buff trash_buff;
+    int must_prefecth = ((fps != NULL) || (buff != NULL)) ? 1 : 0;
 
     ndsd->session[stype] = sess;
 
     ssrc = wait_for_packets(ndsd, stype);
 
-    if ( (ssrc) && (fps != NULL) ) {
+    if ( ((ssrc) && (must_prefetch)) ) {
         if (buff == NULL)
             buff = &trash_buff;
 
@@ -88,7 +89,7 @@ static void link_session_and_fetch_conf(
         /* Packet prefecthing must be done anyway or we won't be
            able to get the metadata, but fps calculation happens
            only if the user didn't specify the FPS */
-        if (!force_fps) {
+        if ( ((!force_fps) && (fps != NULL)) ) {
             while ( *fps <= 0 ) {
                 //Wait more pkts to calculate FPS and try again
                 sched_yield();



More information about the MPlayer-cvslog mailing list