Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MediaArea/MediaInfoLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Martinez <jerome@mediaarea.net>2022-03-31 11:28:08 +0300
committerGitHub <noreply@github.com>2022-03-31 11:28:08 +0300
commit4e965fce4927906968ec4936eaa72a6cec30e3a3 (patch)
tree9749126356671591d4c544b765712f62c2ad2ba8
parent646a3c2f9ad1a5916a416cce396234b405cfd0b7 (diff)
parentf1806e9573e26da7d183f1fb9ca9054f142dc67b (diff)
Merge pull request #1523 from JeromeMartinez/MXF_TimeCode_LastFrame
MXF: time code of last frame (MXF TC only), fix
-rw-r--r--Source/MediaInfo/Multiple/File_Mxf.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/MediaInfo/Multiple/File_Mxf.cpp b/Source/MediaInfo/Multiple/File_Mxf.cpp
index a99ec7534..42c25501e 100644
--- a/Source/MediaInfo/Multiple/File_Mxf.cpp
+++ b/Source/MediaInfo/Multiple/File_Mxf.cpp
@@ -4212,11 +4212,14 @@ void File_Mxf::Streams_Finish_Component_ForTimeCode(const int128u ComponentUID,
if (Component2->second.MxfTimeCode.RoundedTimecodeBase<=(int8u)-1) // Found files with RoundedTimecodeBase of 0x8000
Fill(Stream_Other, StreamPos_Last, Other_FrameRate, Component2->second.MxfTimeCode.RoundedTimecodeBase/(Component2->second.MxfTimeCode.DropFrame?1.001:1.000));
Fill(Stream_Other, StreamPos_Last, Other_TimeCode_FirstFrame, TC.ToString().c_str());
- Fill(Stream_Other, StreamPos_Last, Other_FrameCount, Component2->second.Duration);
- if (TC.FramesPerSecond && Component2->second.Duration)
+ if (Component2->second.Duration && Component2->second.Duration!=(int64u)-1)
{
- TC+=Component2->second.Duration-1;
- Fill(Stream_Other, StreamPos_Last, Other_TimeCode_LastFrame, TC.ToString().c_str());
+ Fill(Stream_Other, StreamPos_Last, Other_FrameCount, Component2->second.Duration);
+ if (TC.FramesPerSecond)
+ {
+ TC+=Component2->second.Duration-1;
+ Fill(Stream_Other, StreamPos_Last, Other_TimeCode_LastFrame, TC.ToString().c_str());
+ }
}
Fill(Stream_Other, StreamPos_Last, Other_TimeCode_Settings, IsSourcePackage?__T("Source Package"):__T("Material Package"));
Fill(Stream_Other, StreamPos_Last, Other_TimeCode_Striped, "Yes");