Mercurial > mplayer.hg
diff libmpdemux/demux_nemesi.c @ 25000:7f615dc6402c
fetch metadata for audio (from amol)
author | lu_zero |
---|---|
date | Mon, 12 Nov 2007 16:39:09 +0000 |
parents | 903477cad47d |
children | 91ab7b261f51 |
line wrap: on
line diff
--- a/libmpdemux/demux_nemesi.c Mon Nov 12 16:32:45 2007 +0000 +++ b/libmpdemux/demux_nemesi.c Mon Nov 12 16:39:09 2007 +0000 @@ -74,12 +74,13 @@ 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 @@ /* 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();