# HG changeset patch # User lu_zero # Date 1194994812 0 # Node ID 9a4d15a28d12e58c0f1ac6d976b5a2a5cbfcd21d # Parent 8af79723e63ecbea0ff0b56f04bdaa7c218012b1 fetch metadata for audio (from amol) diff -r 8af79723e63e -r 9a4d15a28d12 libmpdemux/demux_nemesi.c --- a/libmpdemux/demux_nemesi.c Tue Nov 13 22:57:22 2007 +0000 +++ b/libmpdemux/demux_nemesi.c Tue Nov 13 23:00:12 2007 +0000 @@ -74,12 +74,13 @@ rtp_ssrc *ssrc = NULL; rtp_frame * fr = &ndsd->first_pkt[stype]; rtp_buff trash_buff; + int must_prefetch = ((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();