Allow --sub-track to work with EIA-608 captions, and fix crash on exit
Allow --sub-track to work with EIA-608 captions, and fix crash on exit

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: Rafaël Carré <29a40ef51885229607cd1e19e467be5d13190cad@videolan.org>

shyamalschandra/vlc,shyamalschandra/vlc,xkfz007/vlc,krichter722/vlc,vlc-mirror/vlc,shyamalschandra/vlc,vlc-mirror/vlc,vlc-mirror/vlc,xkfz007/vlc,krichter722/vlc,vlc-mirror/vlc,shyamalschandra/vlc,xkfz007/vlc,xkfz007/vlc,krichter722/vlc,vlc-mirror/vlc,vlc-mirror/vlc,krichter722/vlc,shyamalschandra/vlc,xkfz007/vlc,vlc-mirror/vlc,shyamalschandra/vlc,krichter722/vlc,xkfz007/vlc,krichter722/vlc,krichter722/vlc,shyamalschandra/vlc,xkfz007/vlc