Skip to content

Commit

Permalink
Merge pull request #405 from friction2d/fix-fps
Browse files Browse the repository at this point in the history
VideoStream: fix detected FPS
  • Loading branch information
rodlie authored Jan 5, 2025
2 parents 15df379 + 4e90305 commit 1b29b2d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/FileCacheHandlers/videostreamsdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ void VideoStreamsData::open(const char * const path)
vidCodecPars = iCodecPars;
vidCodec = avcodec_find_decoder(vidCodecPars->codec_id);
fVideoStream = fFormatContext->streams[fVideoStreamIndex];
fTimeBaseDen = fVideoStream->r_frame_rate.den; //avg_frame_rate ??
fTimeBaseNum = fVideoStream->r_frame_rate.num; //avg_frame_rate ??
fTimeBaseDen = fVideoStream->avg_frame_rate.den;
fTimeBaseNum = fVideoStream->avg_frame_rate.num;

if (fTimeBaseDen == 0) {
RuntimeThrow(QObject::tr("Invalid video frame rate denominator (0)"));
}
Expand Down

0 comments on commit 1b29b2d

Please sign in to comment.