vtenc: Fix locking

The object lock only protects the session, as we modify
the session from other threads when the bitrate property
is changed. Don't hold it much longer than for session
related things.

And we need to release the video decoder stream lock before
enqueueing a frames. It might wait for our callback to dequeue
a frame from another thread, which will then take the stream
lock too and deadlock.
fluiddec: fix some memory leaks

https://bugzilla.gnome.org/show_bug.cgi?id=738223
fluiddec: don't leak incoming caps event

https://bugzilla.gnome.org/show_bug.cgi?id=738291
vc1parse: fix framesize when input is frame-layer

frame-layer header is represented as a sequence of 32 bit unsigned
integer serialized in little-endian byte order, so framesize is on the
first 3 bytes.

SMPTE 421M Annex L.

https://bugzilla.gnome.org/show_bug.cgi?id=738243
vc1parse: just assume none header-format when no codec_data is present

https://bugzilla.gnome.org/show_bug.cgi?id=738449
vc1parse: parse frame header when stream format is ASF/raw for simple/main profile

When stream-format is ASF or sequence-layer-raw-frame, we basically have
a raw frame so we can parse it to extract some information such the
keyframe flag. The only requirement is to have a valid sequence-header.

This commit parse the frame header and set the DELTA_UNIT buffer flag in
case the frame is not a keyframe.

https://bugzilla.gnome.org/show_bug.cgi?id=738519
rtmpsink: Free URI string in finalize()

https://bugzilla.gnome.org/show_bug.cgi?id=738674
rtmpsink: Declare sink variable that was forgotten in last commit
vc1parse: select caps according to wmv format at negotiation

Some VC1 decoder can have different caps according to wmv format, ie
WMV3 or WVC1.
So instead of keeping the first available caps, we interserct with
current WMV format.

https://bugzilla.gnome.org/show_bug.cgi?id=738532
vc1parser: fix level values for simple/main profile

In simple profile, level set to 0 or 2 indicate low and medium level
respectively. In main profile, level set to 0, 2 or 4 indicate low,
medium and high level respectively.

Level values are defined in Annex J.1.2 of the SMPTE 421M.

https://bugzilla.gnome.org/show_bug.cgi?id=738230
vc1parser: fix expected level in sequence-layer parsing unit test

Sequence-layer used for unit test have a level set to 2 which should
match the medium level, not the high.

https://bugzilla.gnome.org/show_bug.cgi?id=738230
hlsdemux: reset end_of_playlist attribute when we receive a seek

https://bugzilla.gnome.org/show_bug.cgi?id=738696
rawparse: Don't try to retrieve 0 byte buffers from the adapter in multi-frame mode
rawparse: Check for 0-size after adjusting the size for the frame size

If we don't have a complete raw audio frame we would otherwise still
ask for a 0 sized buffer from the adapter.
rawparse: fix handling of segment event in sink event handler
glfilter: avoid uninitialized variable size when chaining multiple glfilters

https://bugzilla.gnome.org/show_bug.cgi?id=739277
faad: fix wrong unrefs in set_format error code path
configure.ac: auto decision to include GL library fails

The part of the configure.ac that consist to check if we
can include both GL and GLES2 at the same time is failing.
Indeed, in the case NEED_GLES2=yes and NEED_OPENGL=auto,
HAVE_OPENGL variable is updated whereas it should be HAVE_GL
variable that has to be updated (HAVE_OPENGL variable is not
used in the rest of the configure.ac).

https://bugzilla.gnome.org/show_bug.cgi?id=739348

Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
Reviewed-by: Benjamin GAIGNARD <benjamin.gaignard@linaro.org>
gl/examples: use the current X Display from SDL

allows GL context sharing to occur.
mpegtsbase: do not remove programs on EOS

As a consequence, tsdemux won't remove its pads anymore on EOS.

Fixes the case when mpegtsbase is not able to process new packets
after EOS as the corresponding pids aren't known anymore because
the programs were removed and the pes/psi were kept, preventing the
PAT to be parsed again.

https://bugzilla.gnome.org/show_bug.cgi?id=738695

Conflicts:
	gst/mpegtsdemux/mpegtsbase.c