From 44429521ac0da9564b606d959857aa3f616b3e12 Mon Sep 17 00:00:00 2001 From: lu_zero Date: Mon, 12 Nov 2007 16:39:09 +0000 Subject: fetch metadata for audio (from amol) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25028 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_nemesi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libmpdemux/demux_nemesi.c') diff --git a/libmpdemux/demux_nemesi.c b/libmpdemux/demux_nemesi.c index 8e99e0caa4..d31da753c3 100644 --- a/libmpdemux/demux_nemesi.c +++ b/libmpdemux/demux_nemesi.c @@ -74,12 +74,13 @@ static void link_session_and_fetch_conf(Nemesi_DemuxerStreamData * ndsd, 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(Nemesi_DemuxerStreamData * ndsd, /* 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(); -- cgit v1.2.3