fetch metadata for audio (from amol)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25038 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
lu_zero 2007-11-13 23:00:12 +00:00
parent 746c248351
commit 4d8aeade41
1 changed files with 3 additions and 2 deletions

View File

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