1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-02 04:42:10 +00:00

Minor code cleanup.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9911 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rsf 2003-04-12 09:29:13 +00:00
parent 6efe31cb12
commit 7badc92c2a

View File

@ -196,7 +196,7 @@ static void needVideoFrameRate(demuxer_t* demuxer,
extern float force_fps; if (force_fps != 0.0) return; // user used "-fps"
demux_stream_t* d_video = demuxer->video;
sh_video_t* sh_video = (sh_video_t*)(demuxer->video->sh);
sh_video_t* sh_video = (sh_video_t*)(d_video->sh);
// If we already know the subsession's video frame rate, use it:
int fps = (int)(subsession->videoFPS());
@ -211,8 +211,9 @@ static void needVideoFrameRate(demuxer_t* demuxer,
float lastPTS = 0.0, curPTS;
unsigned const maxNumFramesToWaitFor = 100;
for (unsigned i = 0; i < maxNumFramesToWaitFor; ++i) {
if (!awaitRTPPacket(demuxer, demuxer->video,
packetData, packetDataLen, curPTS)) break;
if (!awaitRTPPacket(demuxer, d_video, packetData, packetDataLen, curPTS)) {
break;
}
if (curPTS > lastPTS && lastPTS != 0.0) {
// Use the difference between these two "pts"s to guess the frame rate.