hls: only set DISCONT flag on a valid buffer

Recent refactoring causes this code to be called with either a NULL
fragment, or a non NULL fragment. In the former case, we don't have
a buffer. In the latter case, the original code dealing with DISCONT
assumed the buffer was valid. Testing for a NULL buffer here thus
does not seem to change the intent, and fixes:

Coverity 1195147
This commit is contained in:
Vincent Penquerc'h 2014-04-08 16:53:54 +01:00
parent 39dc1f0ebb
commit c319b1cc8f

View file

@ -768,6 +768,7 @@ gst_hls_demux_configure_src_pad (GstHLSDemux * demux, GstFragment * fragment)
switch_pads (demux, bufcaps);
demux->need_segment = TRUE;
demux->discont = FALSE;
if (buf)
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
}
if (bufcaps)