Skip to content

Commit

Permalink
VideoStream: fix detected FPS
Browse files Browse the repository at this point in the history
Ref: #397
  • Loading branch information
rodlie committed Dec 31, 2024
1 parent d46828b commit 4e90305
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 4e90305

Please sign in to comment.