Skip to content

Commit

Permalink
Avoid setting invalid framerate
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian committed Mar 13, 2020
1 parent 05eaf25 commit 935472a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/AVPlayerPrivate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 275,9 @@ void AVPlayer::Private::initCommonStatistics(int s, Statistics::Common *st, AVCo
#if (defined FF_API_R_FRAME_RATE && FF_API_R_FRAME_RATE) //removed in libav10
//FIXME: which 1 should we choose? avg_frame_rate may be nan, r_frame_rate may be wrong(guessed value)
else if (stream->r_frame_rate.den && stream->r_frame_rate.num) {
st->frame_rate = av_q2d(stream->r_frame_rate);
if (stream->r_frame_rate.num < 95000)
st->frame_rate = av_q2d(stream->r_frame_rate);

qDebug("%d/%d", stream->r_frame_rate.num, stream->r_frame_rate.den);
}
#endif //FF_API_R_FRAME_RATE
Expand Down

0 comments on commit 935472a

Please sign in to comment.