• Martin Storsjö's avatar
    movenc: Use first H264/HEVC frame as extradata, if it is missing · 9f891d0b
    Martin Storsjö authored
    Sticking a full frame in the extradata works, as the code for writing
    the avcC/hvcC extracts the relevant parameter set NAL units - provided
    that they actually exist in the frame.
    
    Some encoders don't provide split out extradata directly on init (or
    at all). In particular, the MediaFoundation encoder wrapper doesn't
    always (depending on the actual encoder device) - this is the case for
    Qualcomm's HEVC encoder on SD835, and also on some QSV H264 encoders).
    
    This only works for cases where the moov hasn't already been written
    (e.g. when not writing fragmented mp4 with empty_moov, unless using
    the delay_moov option).
    Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
    9f891d0b
movenc.c 264 KB