mirror of
https://github.com/mpv-player/mpv
synced 2025-02-05 14:42:24 +00:00
fix forcefps (from amol)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25026 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
979c51209f
commit
365836f628
@ -84,11 +84,17 @@ static void link_session_and_fetch_conf(Nemesi_DemuxerStreamData * ndsd,
|
||||
buff = &trash_buff;
|
||||
|
||||
rtp_fill_buffer(ssrc, fr, buff); //Prefetch the first packet
|
||||
while ( !(rtp_get_pkt(ssrc, NULL)) ) //Wait second pkt to calculate FPS
|
||||
sched_yield();
|
||||
|
||||
if ( (force_fps == 0.0) && (fps != NULL) )
|
||||
*fps = rtp_get_fps(ssrc);
|
||||
/* 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) {
|
||||
while ( *fps <= 0 ) {
|
||||
//Wait more pkts to calculate FPS and try again
|
||||
sched_yield();
|
||||
*fps = rtp_get_fps(ssrc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user