• Devin Heitmueller's avatar
    Allow --sub-track to work with EIA-608 captions, and fix crash on exit · caaac10c
    Devin Heitmueller authored
    Prior to this patch, if the user specified the --sub-track argument on
    the command line, it would not work with MPEG2 streams that contain
    EIA-608 closed captions.  It would also cause an abort() on exit.
    
    The crash was because the various functions that select/unselect
    streams would check for the p_master member, which isn't set until
    after EsOutAdd().  The call to EsOutAdd itself though would call
    EsSelect(), which would treat the ES as a regular subtitle stream
    and cause a resource leak -- which would cause an abort at exit.
    
    The other change actually makes --sub-track work with the special
    case of EIA-608 captions.
    Signed-off-by: default avatarRafaël Carré <funman@videolan.org>
    caaac10c
es_out.c 89.2 KB