VirtualBox

Changeset 68811 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Sep 21, 2017 2:00:57 PM (7 years ago)
Author:
vboxsync
Message:

VideoRec: Fixed seeking in recorded files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/EbmlWriter.cpp

    r68796 r68811  
    499499    {
    500500        WebMSegment(void)
    501             : tcStart(UINT64_MAX)
    502             , tcEnd(UINT64_MAX)
     501            : tcStart(0)
     502            , tcEnd(0)
    503503            , offStart(0)
    504504            , offInfo(0)
     
    829829        Cluster.cBlocks++;
    830830
     831        if (CurSeg.tcEnd < Cluster.tcEndMs)
     832            CurSeg.tcEnd = Cluster.tcEndMs;
     833
    831834        /* Calculate the block's timecode, which is relative to the cluster's starting timecode. */
    832835        uint16_t tcBlockMs = static_cast<uint16_t>(tcPTSMs - Cluster.tcStartMs);
     
    905908        Cluster.tcEndMs = tcPTSMs;
    906909        Cluster.cBlocks++;
     910
     911        if (CurSeg.tcEnd < Cluster.tcEndMs)
     912            CurSeg.tcEnd = Cluster.tcEndMs;
    907913
    908914        /* Calculate the block's timecode, which is relative to the cluster's starting timecode. */
     
    11071113        RTStrPrintf(szApp, sizeof(szApp), VBOX_PRODUCT " %sr%u", VBOX_VERSION_STRING, RTBldCfgRevision());
    11081114
    1109         LogFunc(("Duration=%RU64\n", CurSeg.tcEnd - CurSeg.tcStart));
     1115        const uint64_t tcDuration = CurSeg.tcEnd - CurSeg.tcStart;
     1116
     1117        if (!CurSeg.lstCues.empty())
     1118        {
     1119            LogFunc(("tcDuration=%RU64\n", tcDuration));
     1120            AssertMsg(tcDuration, ("Segment seems to be empty\n"));
     1121        }
    11101122
    11111123        m_Ebml.subStart(MkvElem_Info)
    11121124              .serializeUnsignedInteger(MkvElem_TimecodeScale, CurSeg.uTimecodeScaleFactor)
    1113               .serializeFloat(MkvElem_Segment_Duration, CurSeg.tcEnd - CurSeg.tcStart)
     1125              .serializeFloat(MkvElem_Segment_Duration, tcDuration)
    11141126              .serializeString(MkvElem_MuxingApp, szMux)
    11151127              .serializeString(MkvElem_WritingApp, szApp)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette