When encountering a nonsensical chunk size such as (guint)-1, error out cleanly instead of
continuing and trying to g_memdup() 4GB of data that doesn't exist, which will either abort
in g_malloc() or crash.
Fixes#553295, crash with fuzzed AVI file.
Rather than only checking for volume property on the audio sink
directly, recursively look for it on sinks within it (if it's a bin).
Allows use of sink-as-volume-control where the application has supplied
an audio-sink bin that includes a real audio sink internally.
Corrected documentation about what needs to be freed after calling
gst_rtsp_message_new(), gst_rtsp_message_new_request(),
gst_rtsp_message_new_response() and gst_rtsp_message_new_data().
This is due to race conditions between functions that
modified the mixer like set_volume and
snd_mixer_handle_events since the handle_events
can now be called at any time.
Fixed by adding locking around any snd_mixer call
since even read functions can modify the mixer stucture, since
alsa likes to clear it's values before reading new ones.
The favorite race condition seemed to be that set_volume
called read_elem (in alsalib) that reset the volumes to
0 and then read them with read_x_volume. This read looped
on each channel and as the race condition occured the
channels value could be anything , most of the time
it was 0. Thus no value was read or only the value of
one channel was and the volume was reset to 0.
Fixes bug #478512.
Calling clear at that transition does things like stopping xvideo (which is not
running at that time) and also clearing anything what the application might have drawn.
This breaks handle-expose and autopaint-colorkey features.
Check that we have a valid file descriptor before entering certain functions in
order to avoid undesirable situations.
Add some more debugging in the connect method.
It doesn't make sense to ask installers for the same codec or element twice, so filter out duplicate requests before calling the external helper script and make the unit test check this works right. Fixes#567636.
Remove some useless debug info that reported wrong image sizes.
When upstream does not accept out suggested size, fall back to allocating an
image of the requested width/height instead of the currently configured size.
The problem is that an image is reused from the pool because the width/height
match but the caps on the new buffer are the requested caps with possibly
different height/width resulting in errors.
Don't keep extra references to volume and mute elements; we don't need
to do so.
Ensure we unref pads that we have references to, and release request
pads.
Add gst_rtsp_message_take_header() that takes ownership of the passed header
value. This allows us to avoid an allocations and memory copy in some
situations.
API: GstRTSPMessage::gst_rtsp_message_take_header()