• acolwell@chromium.org's avatar
    Fix SPS/PPS insertion logic in MP4StreamParser. · 4ddd37d8
    acolwell@chromium.org authored
    The code that inserts SPS & PPS NAL units into keyframes wasn't properly
    handling frames that start with AUD NAL units. This patch adds code to
    make sure the configuration data is inserted after the AUD NAL units as
    the H.264 spec mandates.
    
    I've also added AVC::IsValidAnnexB() DCHECKS to verify that our
    code generates proper Annex B data that conforms to the NAL unit
    ordering rules outlined in the spec. These DCHECKS caught the old bad
    behavior and should help prevent future regressions.
    
    BUG=364925
    TEST=AVCConversionTest.NALUSizeTooLarge, AVCConversionTest.NALUSizeIsZero, AVCConversionTest.ValidAnnexBConstructs, AVCConversionTest.InvalidAnnexBConstructs, AVCConversionTest.InsertParamSetsAnnexB
    
    Review URL: https://codereview.chromium.org/246853005
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266316 0039d316-1c4b-4281-b951-d872f2087c98
    4ddd37d8
avc.cc 9.34 KB