• Martin Storsjö's avatar
    movenc: Check that frag_info entries exist in mov_write_sidx_tag · 8e34089e
    Martin Storsjö authored
    This fixes crashes with pathological cases when trying to write
    a sidx index (via the -movflags faststart option, in combination
    with fragmenting options), when no fragments actually have been
    written. (This is possible if the empty_moov flag isn't used,
    so that all actual packet data is written in the moov/mdat pair,
    and no moof/mdat pairs have been written.)
    
    In these pathological cases, no sidx should be written at all.
    Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
    8e34089e
movenc.c 156 KB