# HG changeset patch # User lu_zero # Date 1194885112 0 # Node ID c6aaf2165751ef1fedd9270c7dcc92b6d4e0b4e3 # Parent e429129fa02b597d62c529ba79966a8cd4cccd4a fix forcefps (from amol) diff -r e429129fa02b -r c6aaf2165751 libmpdemux/demux_nemesi.c --- a/libmpdemux/demux_nemesi.c Mon Nov 12 16:26:33 2007 +0000 +++ b/libmpdemux/demux_nemesi.c Mon Nov 12 16:31:52 2007 +0000 @@ -84,11 +84,17 @@ 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); + } + } } }