mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 01:36:25 +01:00
Increased the threshold for how many incoming frames to look at while guessing
the video frame rate (if "-fps" isn't used) - from 100, to 300. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11398 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
7b3588f73d
commit
5607881696
@ -220,12 +220,13 @@ static void needVideoFrameRate(demuxer_t* demuxer,
|
||||
// non-zero "pts" timestamps:
|
||||
unsigned char* packetData; unsigned packetDataLen;
|
||||
float lastPTS = 0.0, curPTS;
|
||||
unsigned const maxNumFramesToWaitFor = 100;
|
||||
unsigned const maxNumFramesToWaitFor = 300;
|
||||
for (unsigned i = 0; i < maxNumFramesToWaitFor; ++i) {
|
||||
if (!awaitRTPPacket(demuxer, d_video, packetData, packetDataLen, curPTS)) {
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf(stderr, "%d: cur %f, last %f\n", i, curPTS, lastPTS);//#####@@@@@
|
||||
if (curPTS > lastPTS && lastPTS != 0.0) {
|
||||
// Use the difference between these two "pts"s to guess the frame rate.
|
||||
// (should really check that there were no missing frames inbetween)#####
|
||||
|
Loading…
Reference in New Issue
Block a user