summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Back to development1.18Tim-Philipp Müller2022-02-021-1/+1
|
* Release 1.18.61.18.6Tim-Philipp Müller2022-02-025-17/+417
|
* tagdemux: Fix crash when presented with malformed filesJeremy Cline2022-02-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | There's a race condition in gsttagdemux.c between typefinding and the end-of-stream event. If TYPE_FIND_MAX_SIZE is exceeded, demux->priv->collect is set to NULL and an error is returned. However, the end-of-stream event causes one last attempt at typefinding to occur. This leads to gst_tag_demux_trim_buffer() being called with the NULL demux->priv->collect buffer which it attempts to dereference, resulting in a segfault. The malicious MP3 can be created by: printf "\x49\x44\x33\x04\x00\x00\x00\x00\x00\x00%s", \ "$(dd if=/dev/urandom bs=1K count=200)" > malicious.mp3 This creates a valid ID3 header which gets us as far as typefinding. The crash can then be reproduced with the following pipeline: gst-launch-1.0 -e filesrc location=malicious.mp3 ! queue ! decodebin ! audioconvert ! vorbisenc ! oggmux ! filesink location=malicious.ogg Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/959 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1295>
* gstvideoencoder: make sure the buffer is writable before modifying metadataJordan Petridis2022-02-011-0/+6
| | | | | | Similar to ae8d0cf3acfaf79d8479647a55bd44b8453d07df Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1294>
* video-converter: Fix for broken gamma remap with high bitdepth YUV outputSeungha Yang2022-01-281-2/+22
| | | | | | | | | | | Scale down the matrix before calculating RGB -> YUV matrix otherwise offset values will be wrong Fixing pipeline videotestsrc ! video/x-raw,format=ARGB ! videoconvert gamma-mode=remap ! \ video/x-raw,format=P010_10LE,colorimetry="bt2020" Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1293>
* Add FEC SDP message testTomasz Andrzejak2022-01-202-1/+66
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1292>
* sdpmessage: fix mapping single char fmtp paramsTomasz Andrzejak2022-01-201-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1292>
* oggdemux: fix a race in push mode when performing the duration seekMatthew Waters2022-01-181-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There may be two or more threads involved here however the important interaction is the use of ogg->seeK_event_drop_till value that was only set in the push-mode seek-event thread and could race with upstream sending e.g. and EOS (or data). Scenario is this: 1. oggdemux performs a seek to near the end of the file to try and find the duration. ogg->push_state is set to PUSH_DURATION. 2. Seek is picked up by the dedicated seek event thread and sets ogg->seek_event_drop_till to the seek event's seqnum. 3. Most operations are blocked or dropped waiting on the duration to be determined and processing continues until a duration is found. 4. Two branching options for how this ultimately plays out 4a. The source is too fast and we receive an EOS event which is dropped because ogg->push_state == PUSH_DURATION. In this case everything works. 4b. We hit our 'almost at the end' check in gst_ogg_pad_handle_push_mode_state() and attempt to seek back to the beginning (or to a user-provided seek). This seek is marshalled to the seek event thread without setting ogg->seek_event_drop_till but with change ogg->push_state = PUSH_PLAYING. If an EOS event or e.g. buffers arrive from upstream before the seek event thread has picked up the seek event, then the EOS/data is processed as if it came as a result of the seek event. This is the case that fails. The fix is two-fold: 1. Preemptively set ogg->seek_event_drop_till when setting the seek event so that data and other events can be dropped correctly. 2. In addition to dropping and EOS events while ogg->push_state == PUSH_DURATION, also drop any EOS events that are received before the seek event has been processed by also tracking the seqnum of the seek. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1291>
* uridecodebin: Fix critical warningsSeungha Yang2022-01-181-4/+4
| | | | | | Don't pass non-GstObject object to there. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1290>
* audio-converter: Fix resampling when there's nothing to outputNirbheek Chauhan2022-01-172-4/+5
| | | | | | | | | | | | | | | | | | | | | Sometimes we can't output anything because we don't have enough incoming frames. In that case, the resampler was trying to call do_quantize() and do_resample() in a loop forever because there would never be samples to output (so chain->samples would always be NULL). Fix this by not calling chain->make_func() in a loop -- seems completely unnecessary since calling it over and over won't change anything if the make_func() can't output samples. Also add some checks for the input and / or output being NULL when doing conversion or quantization. This will happen when we have nothing to output. We can't bail early, because we need resampler->samples_avail to be updated in gst_audio_resampler_resample(), so we must call that and no-op everything along the way. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1289>
* tcp: fix build on SolarisThomas Klausner2021-11-201-0/+4
| | | | | | | | Add missing header. From Claes Nästén via http://gnats.netbsd.org/56509 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1288>
* uridecodebin3: Nullify current item after all play items are freed.Víctor Manuel Jáquez Leal2021-11-201-0/+1
| | | | | | | | | | | | | | | | | | There's a potential race condition with this sort of pipelines on certain systems (depends on the processing load): GST_DEBUG_DUMP_DOT_DIR=/tmp \ gst-launch-1.0 uridecodebin3 uri=file://stream.mp4 ! glupload ! \ glimagesink --gst-debug=*:4 Right after the pipeline passes from PAUSED to READY, bin_to_dot_file dumps uridecodebin3 properties, but current uri and suburi might be already freed, causing a potential use-after-freed. This patch makes NULL the current item right after all the play items are freed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1287>
* audio-resampler: Fix segfault when we can't output any framesNirbheek Chauhan2021-11-201-3/+10
| | | | | | | | | | | | Sometimes the resampler has enough space to store all the incoming samples without outputting anything. When this happens, gst_audio_resampler_get_out_frames() returns 0. In that case, the resampler should consume samples and just return. Otherwise, we get a segfault when gst_audio_resampler_resample() tries to resample into a NULL 'out' pointer. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1286>
* playbin2/3: autoplug/caps: don't expand caps to ANYMatthew Waters2021-10-312-5/+3
| | | | | | | | | | | | Retrieving the pad template caps from a ghost pad returns ANY which when merged with any other caps will return ANY. ANY is not very specific and may cause suboptimal code paths in e.g. decoders that assume the lowest common denominator when presented with ANY caps. Fixes negotiating dma-buf with vaapidecodebin between glupload in the video sink element. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1284>
* uridecodebin3/urisourcebin: Reusability fixesJan Schmidt2021-10-312-33/+155
| | | | | | | | | | | | | | | | Improvements to uridecodebin3 and urisourcebin so that they are reusable across a PAUSED->READY->PAUSED transition. Disconnect and release decodebin3 request pads when urisourcebin removes src pads. In urisourcebin, make sure to remove src pads that are exposed directly (raw pads and static typefind srcpads) when cleaning up. Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/768 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1283>
* playback: Handle sources with dynamic pads and pads already presentThibault Saunier2021-10-311-66/+70
| | | | | | | | In case we already have a pad but more might be added later we were ignoring the new pads added later, we should track the element new pads and expose them as they are added. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1285>
* rtspconnection: Only reset timeout when socket is unusedTobias Ronge2021-10-291-16/+90
| | | | | | | | | | | | After sending or retrieving data, gstrtspconnection resets the socket's timeout to 0 (infinite). This could cause problems if sending and receiving at the same time. For example, if RTCP data is sent from the streaming thread while gstrtspsrc is already retrieving data. With this patch, timeout is only reset to 0 if there is no other thread using the socket. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1282>
* gst-libs/gst/video/gstvideoaggregator.c: fix build with gcc 4.8Fabrice Fontaine2021-10-291-1/+2
| | | | | | | | | | | | | Fix the following build failure with gcc 4.8 which has been added with https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/d268c193ad39fb970351ed62898be806ebd0a71e: ../gst-libs/gst/video/gstvideoaggregator.c: In function 'gst_video_aggregator_init': ../gst-libs/gst/video/gstvideoaggregator.c:2762:3: error: 'for' loop initial declarations are only allowed in C99 mode for (gint i = 0; i < gst_caps_get_size (src_template); i++) { ^ Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1281>
* Back to developmentTim-Philipp Müller2021-09-091-1/+1
|
* Release 1.18.51.18.5Tim-Philipp Müller2021-09-085-10/+646
|
* rtspconnection: Consistently translate GIOError to GstRTSPResultNirbheek Chauhan2021-09-061-36/+44
| | | | | | | | | | | | | | | The users of this API need to be able to differentiate between EINTR and ERROR. For example, in rtspsrc, gst_rtsp_conninfo_connect() behaves differently when gst_rtsp_connection_connect_with_response_usec() returns an ERROR or EINTR. The former is an element error while the latter is simple a GST_ERROR since it was a user cancellation of the connection attempt. Due to this, rtspsrc was incorrectly emitting element errors while going to NULL, which would or would not reach the application in a racy manner. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1271>
* gl/wayland: Use consistent wl_display when creating work queue for proxy wrapperScott Moreau2021-08-051-2/+1
| | | | | | | | Without this, glimagesink since wayland 727c7903 fails with gst-launch-1.0: ../src/wayland-client.c:2181: wl_proxy_set_queue: Assertion 'proxy->display == queue->display' failed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1247>
* audioaggregator: Resync on the next buffer when dropping a buffer on discont ↵Sebastian Dröge2021-07-162-19/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | resyncing If a buffer is dropped during resyncing on a discont because either its end offset is already before the current output offset of the aggregator or because it fully overlaps with the part of the current output buffer that was already filled, then don't just assume that the next buffer is going to start at exactly the expected offset. It might still require some more dropping of samples. This caused the input to be mixed with an offset to its actual position in the output stream, causing additional latency and wrong synchronization between the different input streams. Instead consider each buffer after a discont as a discont until the aggregator actually resynced and starts mixing samples from the input again. Also update the start output offset of a new input buffer if samples have to be dropped at the beginning. Otherwise it might be mixed too early into the output and overwrite part of the output buffer that already took samples from this input into account. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/912 which is a regression introduced by https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1180/ Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1228>
* video-converter: Set up gamma tables only onceJan Alexander Steffens (heftig)2021-07-071-2/+6
| | | | | | | | | | When the video converter is using multiple threads, the gamma tables were created multiple times, leaking the tables set up for the previous thread. Only calculate the tables once. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1217>
* audio-converter: Free config when gst_audio_converter_new failsJan Alexander Steffens (heftig)2021-07-071-0/+2
| | | | | | The config got leaked when parameter validation fails. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1217>
* video-converter: Set up matrix tables only once.Jan Schmidt2021-06-281-5/+9
| | | | | | | | When configuring a multi-thread converter, only allocate the shared colour conversion matrices once for the first thread, to avoid allocating multiple times and leaking memory. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1220>
* gstrtspconnection: Add IPv6 support for tunneled modePer Förlin2021-06-241-4/+18
| | | | | | | | An IPv6 address must be specified within [] brackets. Add brackets for IPv6 address used for tunneled mode, for non-tunneled this is already supported. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1214>
* audiobasesink: Fix of double lock releaseSergei Kovalev2021-06-221-0/+1
| | | | | | Add missing "return;" which prevents double lock release. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1210>
* rawbaseparse: check destination format correctlyDaniel Knobe2021-06-021-1/+2
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1186>
* audiomixer: Add test for discont going backwardsOlivier Crête2021-06-021-0/+78
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1185>
* audioaggregator: Don't overwrite already written samplesOlivier Crête2021-06-021-6/+11
| | | | | | | On re-sync, don't forget what has already been written. Instead, just drop any samples that overlap with parts that were already filled. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1185>
* audiobasesrc: Fix divide by zero assertionSeungha Yang2021-06-011-6/+11
| | | | | | | GstAudioRingBufferSpec can be cleared from other thread, then rate value will be zero Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1183>
* audio,video-format: Make generate_raw_formats idempotent for assertionsMarijn Suijten2021-06-012-2/+6
| | | | | | | | When compiling without assertions `g_assert` and its contents disappear resulting in no list being deserialized at all and the `gst_{audio,video}_formats_raw` functions to return an empty collection. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1182>
* compositor: Fix NV12 blend operationNicolas Dufresne2021-05-201-2/+2
| | | | | | | | | | The full src_height/width was being used instead of the remaining width/height for the current band. As a side effect, that value would get erroneously reset and would cause overrun. Fixes #887 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1163>
* appsrc: Don't leak buffer list while wrongly unreffing buffer on EOS/flushingSebastian Dröge2021-05-031-4/+12
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1135>
* app: Add gstappsrc.h to the enum headers in meson.buildSebastian Dröge2021-05-031-1/+1
| | | | | | It's already indirectly included but let's better be explicit here. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1135>
* videotestsrc: Fix a leak when computing alpha capsNirbheek Chauhan2021-04-301-0/+1
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1132>
* gstgl: Fix build when Meson >= 0.58.0rc1Xavier Claessens2021-04-271-3/+12
| | | | | | | | | | | "implicit_include_directories: false" now also means that current build directory is not added to include paths by default any more. We have to add it manually because we have some custom_target() that generate headers in current build directory. See https://github.com/mesonbuild/meson/issues/8700. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1127>
* uridecodebin: Don't force floating reference for future reusable decodebinSeungha Yang2021-04-211-2/+9
| | | | | | | | | uridecodebin assumes that refcount of decodebins stored in pending_decodebins are floating but it might not be true in case that refcount of the decodebin was touched in other places. To avoid the floating refcount issue, hold strong reference. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1119>
* uridecodebin: Use gst_object_ref instead of g_object_refSeungha Yang2021-04-211-1/+1
| | | | | | It's more debugging friendly (tracer for example) Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1119>
* playbin{2,3}: fix base_time selection when flush seeking liveMathieu Duponchelle2021-04-142-6/+44
| | | | | | | | | | This is a direct translation of <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/429>, as playbin{2,3} insulates its sub groups state changes from the pipeline base class, it needs to track whether the subgroup is live itself, and handle RESET_TIME the same way GstPipeline does. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1110>
* gstgiobasesink: Handle incomplete writes in gst_gio_base_sink_render()Robin Burchell2021-04-131-17/+5
| | | | | | | | | | | | | As the comment asked, yes, incomplete writes can happen. I have encountered this with an sshfs mount, for example. It seems like g_output_stream_write_all() is designed to handle this case, by not returning until the requested buffer has been completely written, or an error occurs, which seems to match up with the desired behaviour. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/885 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1108>
* clockoverlay: Fix broken string formatting by strftime() on WindowsSeungha Yang2021-04-132-0/+33
| | | | | | | | | | Like other foobarA variant APIs on Windows, formatted string by strftime() is ANSI string, not unicode encoded one. It would be problematic for non-english locale systems. We should use unicode version API (wcsftime in this case) whenever it's possible on Windows. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1107>
* gst: don't use volatile to mean atomicMatthew Waters2021-04-1345-70/+70
| | | | | | | | | | | | volatile is not sufficient to provide atomic guarantees and real atomics should be used instead. GCC 11 has started warning about using volatile with atomic operations. https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719 Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1106>
* Fix build issue on MinGW64Binh Truong2021-04-071-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1098>
* parsebin: Put stream flags in GstStreamEdward Hervey2021-03-251-1/+3
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1086>
* gl/wayland: provide a dummy global_remove functionMatthew Waters2021-03-251-2/+15
| | | | | | | | | | Even if we don't care about any global objects being removed, wayland will still error if globals are removed without a corresponding listener set up for them. e.g. wl_output hotplugging Discovered by: Matthias Clasen Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1085>
* gstgiosrc: Don't leak scheme string in gst_gio_src_query()Jan Schmidt2021-03-251-0/+1
| | | | | | | Add a g_free() in the code path that forwards the query to the parent handler. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1084>
* Back to developmentTim-Philipp Müller2021-03-151-1/+1
|
* Release 1.18.41.18.4Tim-Philipp Müller2021-03-155-8/+335
|