Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfe478ff

Browse files
author
Marc-Antoine Arnaud
committed
Merge branch 'develop' of github.com:avTranscoder/avTranscoder into dev_docker
2 parents8ea3512 +cbb248b commitfe478ff

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

‎src/AvTranscoder/common.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#defineAVTRANSCODER_VERSION_MAJOR0
55
#defineAVTRANSCODER_VERSION_MINOR11
6-
#defineAVTRANSCODER_VERSION_MICRO1
6+
#defineAVTRANSCODER_VERSION_MICRO2
77

88
#include<AvTranscoder/system.hpp>
99

‎src/AvTranscoder/properties/VideoProperties.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,12 @@ int VideoProperties::getLevel() const
432432

433433
floatVideoProperties::getFps()const
434434
{
435-
returnav_q2d(_formatContext->streams[_streamIndex]->avg_frame_rate);
435+
if(! _formatContext)
436+
throwstd::runtime_error("unknown format context");
437+
438+
if(_formatContext->streams[_streamIndex]->avg_frame_rate.den)
439+
returnav_q2d(_formatContext->streams[_streamIndex]->avg_frame_rate);
440+
returnav_q2d(av_inv_q(getTimeBase()));
436441
}
437442

438443
floatVideoProperties::getDuration()const

‎src/AvTranscoder/properties/VideoProperties.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class AvExport VideoProperties : public StreamProperties
6464

6565
/**
6666
* @brief Corresponds to the 'fps' returned by ffprobe.
67+
* @note If the average framerate is not defined in the format, return the tbn.
6768
* fps = the average framerate that has come from the AVStream
6869
* tbn = the time base in AVStream that has come from the AVStream
6970
* tbc = the time base in AVCodecContext for the codec used for a particular stream

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp