[vlc-devel] [vlc-commits] demux: hls: restart TS demux on switch

Tristan Matthews tmatth at videolan.org
Mon Jul 18 16:26:15 CEST 2016


n Mon, Jul 18, 2016 at 10:19 AM, Francois Cartegnie <git at videolan.org> wrote:
> vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jul 18 16:12:50 2016 +0200| [bb3135470b10e11efcb6fe3f2a7c9165362ab0b7] | committer: Francois Cartegnie
>
> demux: hls: restart TS demux on switch
>
> Because there's zero requirement in spec
> to flag PAT or PMT for update or use another
> program on switch
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb3135470b10e11efcb6fe3f2a7c9165362ab0b7
> ---
>
>  modules/demux/hls/HLSStreams.cpp |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/modules/demux/hls/HLSStreams.cpp b/modules/demux/hls/HLSStreams.cpp
> index e3cf236..c8a8833 100644
> --- a/modules/demux/hls/HLSStreams.cpp
> +++ b/modules/demux/hls/HLSStreams.cpp
> @@ -65,6 +65,8 @@ AbstractDemuxer * HLSStream::createDemux(const StreamFormat &format)
>
>          case StreamFormat::MPEG2TS:
>              ret = new Demuxer(p_realdemux, "ts", fakeesout->getEsOut(), demuxersource);
> +            if(ret)
> +                ret->setCanDetectSwitches(false);

Unless you're using std::nothrow, new won't return 0 but will throw an
std::bad_alloc exception here.

Best,
Tristan


More information about the vlc-devel mailing list