Projects
home:zaitor:branches:Essentials
gstreamer-plugins-bad-codecs
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 4
View file
gstreamer-plugins-bad-codecs.changes
Changed
@@ -1,6 +1,7 @@ ------------------------------------------------------------------- -Thu Sep 10 21:05:55 UTC 2026 - Bjørn Lie <zaitor@opensuse.org> +Thu Sep 10 21:13:15 UTC 2026 - Bjørn Lie <zaitor@opensuse.org> +- Update to versiom 1.28.7 - Stop building rtmp support, drop pkgconfig(librtmp) BuildRequires. The new rtmp2 plugin available in gst-bad is newer and better.
View file
gstreamer-plugins-bad-codecs.spec
Changed
@@ -7,7 +7,7 @@ %define _version 1.28.0 Name: gstreamer-plugins-bad-codecs -Version: 1.28.5 +Version: 1.28.7 Release: 0 Summary: Codecs/plugins for gstreamer-plugins-bad License: LGPL-2.1-or-later
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ChangeLog -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ChangeLog
Changed
@@ -1,3 +1,572 @@ +=== release 1.28.7 === + +2026-09-07 20:11:13 +0100 Tim-Philipp Müller <tim@centricular.com> + + * gst-plugins-bad.doap: + * meson.build: + Release 1.28.7 + +2026-09-02 17:52:16 +0200 Stéphane Cerveau <scerveau@igalia.com> + + * ext/vulkan/vkav1dec.c: + * ext/vulkan/vkvp9dec.c: + vulkan(av1,vp9)dec: set access NONE at buffer pool allocation parameters + Fixing VUID 03915 as the decoding queue might not have transfer + capabilities, see anv driver. + See #7165 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12417> + +2026-09-03 14:28:18 -0400 Thibault Saunier <tsaunier@igalia.com> + + * tests/validate/autovideoconvert/renegotiate.validatetest: + * tests/validate/codectimestamper/h264_propagate_caps.validatetest: + * tests/validate/opencv/cvtracker.validatetest: + * tests/validate/testsrcbin/caps_spec.validatetest: + * tests/validate/vtenc/vtenc_h264.validatetest: + * tests/validate/vtenc/vtenc_h264_b_frames.validatetest: + * tests/validate/vtenc/vtenc_h265.validatetest: + * tests/validate/vtenc/vtenc_h265_b_frames.validatetest: + validate: Reindent all validatetest files + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12343> + +2026-03-03 15:02:23 +0000 Thibault Saunier <tsaunier@igalia.com> + + * tests/validate/autovideoconvert/renegotiate.validatetest: + * tests/validate/codectimestamper/h264_propagate_caps.validatetest: + * tests/validate/opencv/cvtracker.validatetest: + * tests/validate/testsrcbin/caps_spec.validatetest: + * tests/validate/vtenc/vtenc_h264.validatetest: + * tests/validate/vtenc/vtenc_h264_b_frames.validatetest: + * tests/validate/vtenc/vtenc_h265.validatetest: + * tests/validate/vtenc/vtenc_h265_b_frames.validatetest: + validateflow: auto-derive directories from test file path + Allow validateflow configs to be written as proper nested structures + instead of requiring the $(validateflow) variable expansion: + configs = { + validateflow, pad=sink:sink, buffers-checksum=true, + } + instead of: + configs = { + "$(validateflow), pad=sink:sink, buffers-checksum=true", + } + When expectations-dir or actual-results-dir are not explicitly set, + validate_flow_override_new() now derives them from the __filename__ + metadata field (already attached to each config structure by the + parser). This mirrors the path computation done in + gst_validate_structure_set_variables_from_struct_file(). + The $(validateflow) variable and the old string syntax remain fully + supported for backward compatibility. + Port all existing .validatetest files to the new syntax. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12343> + +2026-08-08 12:12:09 +0200 Mark Nauwelaerts <mnauw@users.sourceforge.net> + + * gst/mpegdemux/gstmpegdemux.c: + mpegdemux: restore gap sending + Gap logic was ported from tsdemux in commit 1b762ba0129610f742b9855e435bce5444a4d553. + However, gap_ref_buffers was never updated, so it remains 0 and would therefore + prevent sending gap events on a stream once it sent a single buffer. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12400> + +2026-09-01 20:10:33 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst-libs/gst/hip/gsthipstream.cpp: + hipstream: Return actual device_id instead of vendor from device_id getter + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12394> + +2026-09-01 14:31:58 +0200 Edward Hervey <edward@centricular.com> + + * gst/pnm/gstpnmutils.c: + * tests/check/elements/pnm.c: + pnmdec: Protect against bogus dimensions headers + Fixes https://oss-fuzz.com/testcase-detail/4567215417131008 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12390> + +2026-04-16 12:33:55 +0200 Pablo García <pgarcia@fluendo.com> + + * gst/mpegtsdemux/tsdemux.c: + tsdemux: Add 'stream-format' field for AC-4 caps + According to Annex G of the AC-4 spec, the syncframe is an optional + layer for encapsulating AC-4 raw frames. This demuxer always outputs + syncframes, but the AC-4 parser/decoder needs to know. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12371> + +2026-08-29 21:42:48 +0900 Seungha Yang <seungha@centricular.com> + + * gst-libs/gst/d3d12/gstd3d12converter-unpack.cpp: + * gst-libs/gst/d3d12/gstd3d12stagingmemory.h: + d3d12: Fix copy-paste typos + Fix copy-paste typos in unpack code and staging memory header + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12368> + +2026-07-04 18:02:56 +0200 Antonio Rojas <arojas@archlinux.org> + + * ext/opencv/gstcameracalibrate.cpp: + * ext/opencv/gstfaceblur.h: + * ext/opencv/gstfacedetect.h: + * ext/opencv/gsthanddetect.h: + * ext/opencv/gstsegmentation.cpp: + * gst-libs/gst/opencv/meson.build: + opencv: Support OpenCV 5 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12363> + +2026-08-28 13:08:08 +0900 Seungha Yang <seungha@centricular.com> + + * sys/hip/gsthipmemorycopy.cpp: + hipmemorycopy: Add missing ifdef guard + All the code in gst_hip_memory_copy_before_transform() requires + GstCuda to be enabled + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12361> + +2026-08-23 12:15:51 +0900 Seungha Yang <seungha@centricular.com> + + * gst-libs/gst/d3d12/gstd3d12cmdqueue.cpp: + d3d12cmdqueue: Fix deadlock during GC + Release completed GC data without lock taken since + notify can acquire other locks + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12353> + +2026-08-12 14:31:34 +0900 Seungha Yang <seungha@centricular.com> + + * gst/mxf/mxfdemux.c: + mxfdemux: Fix keyframe detection + According to ST 377-1:2019, 11.2.3, PosTableIndex in + Delta Entry Array specifies temporal reordering and is not related + to the random access flag in an Index Entry. + As it's already done in the keyframe search code above, always + respect the 0x80 random access flag when determining whether an + index entry is a keyframe + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12324> + +2026-08-21 20:26:02 +0900 Seungha Yang <seungha@centricular.com> + + * sys/hip/meson.build: + hip: Fix hipcc detection on Windows with HIP SDK 7.x + The hipcc compiler binary name was changed at some point between + 6.x and 7.x. Try to find hipcc.exe too + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12332> + +2026-06-02 12:54:33 +0200 Stéphane Cerveau <scerveau@igalia.com> + + * ext/onnx/gstonnxinference.c: + * gst-libs/gst/analytics/modelinfo.c: + onnxinference: fix dead lock with wrong model file + If the model file is not reachable, error out on resource error and + release the object lock before to avoid dead lock from + GST_ELEMENT_ERROR. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12329> + +2026-08-17 12:49:02 +0200 Stéphane Cerveau <scerveau@igalia.com> + + * ext/onnx/gstonnxinference.c: + onnxinference: drop redundant status cleanup in output loop + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12329> + +2026-08-18 12:48:42 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/androidmedia/gstamc.c: + * sys/androidmedia/gstamc.h: + * sys/androidmedia/gstamcvideodec.c: + * sys/androidmedia/gstamcvideoenc.c: + amc: Don't set the Hardware class in metadata for sw video codecs + This is required for decodebin and apps to be able to detect when hw + codecs or sw codecs are being used. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12327> + +2026-06-14 22:58:02 +0900 masa-iwm <masa.iwm@gmail.com> + + * sys/dwrite/gstdwritebaseoverlay.cpp: + dwritebaseoverlay: Fix assertion 'G_VALUE_HOLDS_UINT (value)' + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12323> + +2026-08-11 17:03:45 +0900 masa-iwm <37230118+masa-iwm@users.noreply.github.com> + + * sys/d3d12/gstd3d12dxgicapture.cpp: + d3d12screencapturesrc: Fix out-of-bounds access with monochrome cursors + Fixed an issue where attempting to capture monochrome cursors, + such as high-contrast cursors, resulted in an out-of-bounds access. + The code for d3d11screencapturesrc was correct, + and the access range has now been aligned with it. + Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5259 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12320> + +2026-08-10 18:15:14 +0900 Seungha Yang <seungha@centricular.com> + + * gst-libs/gst/hip/meson.build: + hip: Add missing API version suffix in library filename + Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5245 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12299> + +2026-08-13 10:46:24 +0900 Seungha Yang <seungha@centricular.com> + + * ext/onnx/gstonnxinference.c: + onnx: Fix nullptr dereference on ORT init failure + Error out if failed to get the OrtApi object + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12295> + +2026-08-06 11:46:33 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/jpegformat/gstjpegparse.c: + jpegparse: Read app0 id in a host-endianness-independent way + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12259> + +2026-08-06 10:55:11 +0800 Lei Zhen <leo.zhen@netint.cn> + + * gst/jpegformat/gstjpegparse.c: + jpegparse: Fix byte order of JFIF density fields + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12259> + +2026-08-03 17:48:41 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/tensordecoders/gstssdtensordec.c: + ssdtensordec: The classes were off by one + The first reported class is class 1, but that's at index 0 in the labels file. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12256> + +2026-08-05 13:04:46 +0100 Tim-Philipp Müller <tim@centricular.com> + + * meson.build: + Back to development after 1.28.6 + +=== release 1.28.6 === + +2026-08-05 12:59:39 +0100 Tim-Philipp Müller <tim@centricular.com> + + * gst-plugins-bad.doap: + * meson.build: + Release 1.28.6 + +2026-07-08 17:05:14 +0300 Sebastian Dröge <sebastian@centricular.com> + + * ext/openjpeg/gstopenjpegdec.c: + openjpegdec: Clamp x0/x1/y0/y1 to the available frame size in stripe mode + While y0/y1 were already clamped, the lack of clamping x0/x1 allowed caps to + specify a different size than the actual frame which could then lead to reading + or writing too many bytes. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12246> + +2026-07-07 17:20:50 +0300 Sebastian Dröge <sebastian@centricular.com> + + * ext/openjpeg/gstopenjpegdec.c: + openjpegdec: Use gsize for strides instead of gint + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12246> + +2026-07-07 15:22:34 +0300 Sebastian Dröge <sebastian@centricular.com> + + * ext/openjpeg/gstopenjpeg.h: + * ext/openjpeg/gstopenjpegdec.c: + openjpegdec: Fix some typos in error messages + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12246> + +2026-07-07 15:18:10 +0300 Sebastian Dröge <sebastian@centricular.com> + + * ext/openjpeg/gstopenjpegdec.c: + openjpegdec: Unmap input/output buffers in error cases + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12246> + +2026-07-07 16:28:28 +0300 Sebastian Dröge <sebastian@centricular.com> + + * ext/openjpeg/gstopenjpegdec.c: + openjpegdec: Only use YOsiz and Ysiz in striped mode and clamp to caps height + We assume that in striped mode the smallest YOsiz of a frame is always 0. + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5187 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12246> + +2026-07-07 15:20:51 +0300 Sebastian Dröge <sebastian@centricular.com> + + * ext/openjpeg/gstopenjpegdec.c: + openjpegdec: Negotiate with width/height of the actual image instead of upstream caps + In non-striped mode. This allows us to not rely on the upstream caps being + correct and work from the data we have anyway. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12246> + +2026-08-03 12:30:45 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/adpcmdec/adpcmdec.c: + adpcmdec: Fix IMA ADPCM input size check to match with the actual code + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5231 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12245> + +2026-08-03 12:30:30 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/adpcmdec/adpcmdec.c: + adpcmdec: Fail negotiation if block_align is not provided + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12245> + +2026-07-13 11:04:28 +0900 Seungha Yang <seungha@centricular.com> + + * gst-libs/gst/codecparsers/gsth265parser.c: + h265parser: Fix out-of-bounds writes in RPS parsing + Add missing bounds checks. + Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5196 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12239> + +2026-07-18 16:19:17 +0200 Tim-Philipp Müller <tim@centricular.com> + + * ext/bz2/gstbz2dec.h: + * ext/bz2/gstbz2enc.h: + * ext/dtls/gstdtlsagent.h: + * ext/dtls/gstdtlscertificate.h: + * ext/dtls/gstdtlsconnection.h: + * ext/resindvd/rsndec.h: + * ext/ttml/gstttmlrender.h: + * ext/wayland/gstwaylandsink.h: + * gst/debugutils/gsttestsrcbin.c: + * gst/pnm/gstpnmdec.h: + * gst/pnm/gstpnmenc.h: + * gst/transcode/gst-cpu-throttling-clock.h: + * sys/kms/gstkmsallocator.h: + * sys/kms/gstkmsbufferpool.h: + * sys/kms/gstkmssink.h: + * sys/va/gstvafilter.h: + gst-plugins-bad: remove incorrect G_GNUC_CONST annotation for get_type() functions + G_GNUC_CONST must only be used for functions that don't modify global state. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12157> + +2026-06-19 10:49:57 +0100 Charles <charles05@canonical.com> + + * ext/dtls/gstdtlsconnection.c: + dtls: make BIO read signal retry instead of EOF when no data + The DTLS plugin was using OpenSSL through a custom memory BIO registered + via BIO_meth_set_read. When the handshake is driven and no incoming datagram is + queued, the bio_method_read callback returned 0 without setting the read-retry + flag, while the BIO's BIO_CTRL_EOF control reports "not at EOF". This is invalid + usage, a BIO that has no data available right now must signal retry, not return + 0. + Up to and including OpenSSL 3.5.x this happened to be tolerated: the empty read + surfaced as SSL_ERROR_SYSCALL with an empty error queue (errno 0), which + gstdtlsconnection's handle_error explicitly ignores and retries. + OpenSSL 4.0.0 stopped allowing it. Commit + be42447469dcccc68b7e115c7947e3c25124f3f2 "Fix the converters between the old and + new BIO_read functions to handle end-of-file state properly" + (PR openssl/openssl#29290, first released in 4.0.0) reworked bread_conv: when an + old-style read returns 0 and BIO_CTRL_EOF reports not-at-EOF it now sets + BIO_FLAGS_AUTO_EOF, and BIO_eof returns 1 whenever that flag is set. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12191> + +2026-07-29 15:20:40 +0900 Seungha Yang <seungha@centricular.com> + + * gst/closedcaption/gsth265reorder.c: + h265seiinserter: Fix HEVC with alpha stream handling + Ignore NAL units with non-zero nuh_layer_id, as h265decoder does, + applying the same change as + https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11144 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12189> + +2026-07-17 12:01:06 +0300 Sebastian Dröge <sebastian@centricular.com> + + * ext/resindvd/gstmpegdemux.c: + resindvd: mpegpsdemux: Port parse_psm() to byte readers + Apply 948b87bf15 here too. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12183> + +2026-07-17 11:13:44 +0300 Sebastian Dröge <sebastian@centricular.com> + + * ext/resindvd/gstmpegdemux.c: + resindvd: mpegpsdemux: Port over byte reader changes from the main plugin + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12183> + +2026-07-16 15:34:02 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/mpegdemux/gstmpegdemux.c: + mpegpsdemux: Use byte readers for parsing data and make sure enough data is available + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12183> + +2026-07-21 15:35:44 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * meson.build: + meson: Make the g-ir-scanner init section consistent across modules + We weren't disabling the registry correctly due to typos and missing + env vars. + This speeds up introspection builds considerably on Windows. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12163> + +2026-07-21 15:32:45 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com> + + * gst/mpegtsdemux/tsdemux.c: + tsdemux: Don't assert if stream pad was not yet created + Fix an assert when a continuity missmatch is detected for a stream for which its + pad is not yet exposed. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12162> + +2026-07-20 16:51:43 +0900 Jihoon Lee <ejihoon.lee@lge.com> + + * gst-libs/gst/wayland/gstwlvideobufferpool.c: + wlvideobufferpool: Fix memory leak in gst_wl_video_buffer_pool_alloc_buffer + Fix dma_mem leak on buffer too small path in gst_wl_video_buffer_pool_alloc_buffer() + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12160> + +2026-07-14 04:01:10 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/applemedia/vtdec.c: + vtdec: Don't register the hw-only variant on simulators + Simulators *never* expose a hardware decoder in the VT APIs. It is + always a software decoder, even if the implementation might be backed + by a hardware decoder on the host system. + This was tested on iOS and tvOS Simulators on an M4 Mac Mini, M1 Mac + Mini, and a 2014 Intel Mac Mini. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12112> + +2026-07-16 21:31:45 +0200 Diego Nieto <dnieto@fluendo.com> + + * gst-libs/gst/codecparsers/gsth266parser.c: + h266parser: fix SEI parsing error handler + Clear the partially parsed SEI message in case of an error to + prevent memory leaks and avoid processing stale data. + Fixes #5219 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12132> + +2026-04-10 19:50:06 -0400 Olivier Crête <olivier.crete@collabora.com> + + * ext/tflite/gsttfliteinference.c: + tflifeinference: Fix leaks + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11404> + +2026-07-13 18:47:16 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/dvdspu/gstspu-vobsub.c: + dvdspu: Fix too strict off-by-one bounds check in a couple of places + This prevented reading the last byte in some cases. + Also add a missing bounds check to a debug function that is not compiled in by + default, so is actually not really important at all. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12126> + +2026-07-16 13:45:51 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/pnm/gstpnmdec.c: + pnmdec: Fix out-of-bounds write with bitmap PNM files and non-multiple-of-8 resolutions + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12124> + +2026-07-16 13:42:04 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/pnm/gstpnmdec.c: + pnmdec: Use correct return value for negotiation failure + This returns GstFlowReturn and FALSE equals to GST_FLOW_OK. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12124> + +2026-07-16 13:31:58 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/pnm/gstpnmdec.c: + pnmdec: Don't flush more data from the adapter than is available + Instead wait for future data. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12124> + +2026-07-16 13:31:26 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/pnm/gstpnmdec.c: + pnmdec: Don't assert if creating the output state fails + This can happen e.g. if the resolution is too large for the given format. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12124> + +2026-07-08 19:30:19 +0800 He Junyan <junyan.he@intel.com> + + * sys/va/gstvavp9enc.c: + va: vp9enc: Mark super frame as corrupt when any frame is corrupt + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12123> + +2026-07-08 19:24:14 +0800 He Junyan <junyan.he@intel.com> + + * sys/va/gstvaav1enc.c: + va: av1enc: Mark TU as corrupt when any frame is corrupt + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12123> + +2026-07-08 15:02:16 +0200 Maksim Nikolaev <maksim.nikolaev.dev@gmail.com> + + * sys/va/gstvabaseenc.c: + * sys/va/gstvaencoder.c: + * sys/va/gstvaencoder.h: + va: recover from corrupt or overflowing coded buffers + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12123> + +2026-07-08 15:01:42 +0200 Maksim Nikolaev <maksim.nikolaev.dev@gmail.com> + + * sys/va/gstvaav1enc.c: + * sys/va/gstvabaseenc.c: + * sys/va/gstvabaseenc.h: + * sys/va/gstvah264enc.c: + * sys/va/gstvah265enc.c: + * sys/va/gstvavp8enc.c: + * sys/va/gstvavp9enc.c: + va: size the coded buffer for the CBR bitrate budget + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12123> + +2026-07-13 15:24:31 +1000 Matthew Waters <matthew@centricular.com> + + * gst-libs/gst/vulkan/gstvktrash.c: + vulkantrash: avoid reinitializing trash objects multiple times + Fixes a leak of miniobject private data. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12117> + +2026-07-13 16:02:34 +1000 Matthew Waters <matthew@centricular.com> + + * gst-libs/gst/vulkan/gstvkformat.c: + vulkan/format: add 3-plane i420 format + mesa/amd chooses this format for I420. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12117> + +2026-07-16 09:00:50 +1000 Jan Schmidt <jan@centricular.com> + + * sys/d3d11/gstd3d11winrtcapture.cpp: + d3d11winrtcapture: Fix incorrect capture height + Fix a typo where capture_height would not get properly + assigned. Fixes invalid copy region errors. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12115> + +2026-07-14 18:15:07 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * docs/meson.build: + docs: Fix build when mse library is disabled + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12113> + +2026-07-08 10:30:35 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/videoparsers/gstvc1parse.c: + vc1parse: Set has_timing_info() / syncable() in start() + The values are reset in PAUSED->READY so setting them only in instance init is + not enough. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12102> + +2026-07-08 10:29:59 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/pcapparse/gstirtspparse.c: + irtspparse: Set min frame size in start() + The value is reset in PAUSED->READY so setting it only once in instance init is + not enough. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12102> + +2026-07-10 09:24:27 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com> + + * ext/gtk/gstgtkwaylandsink.c: + * ext/wayland/gstwaylandsink.c: + waylandsink: Omit reporting drop frame on preroll + These sink are a bit special, since they report dropped frame on the next + incoming frame. If the sink queue is full when the paused state is reached, + the preroll during paused to playing transition will report a drop, which + leads to base sink aborting the transition. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12037> + +2026-07-07 19:23:32 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/videoparsers/gstdiracparse.c: + * gst/videoparsers/gsth263parse.c: + h263parse: diracparse: Sync baseparse configuration with other compressed video parsers + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12096> + +2026-07-08 15:41:59 +0200 Albert Sjölund <alberts@axis.com> + + * ext/webrtc/gstwebrtcbin.c: + webrtcbin: fix possible floating leak for post-aux + The behaviour is different between aux-sender and post-aux-sender. There + is a conditional ref_sink if the element is floating in one but not the + other. As the element is afterwards added to a bin sink the element + before adding. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12085> + +2026-07-08 23:48:39 +0200 Tim-Philipp Müller <tim@centricular.com> + + * meson.build: + Back to development after 1.28.5 + === release 1.28.5 === 2026-07-08 23:42:39 +0200 Tim-Philipp Müller <tim@centricular.com>
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/RELEASE -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/RELEASE
Changed
@@ -1,4 +1,4 @@ -This is GStreamer gst-plugins-bad 1.28.5 +This is GStreamer gst-plugins-bad 1.28.7 The GStreamer team is thrilled to announce a new major feature release of your favourite cross-platform multimedia framework!
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/docs/meson.build -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/docs/meson.build
Changed
@@ -121,7 +121,6 @@ 'codecparsers': codecparsers_gir0.full_path(), 'codecs': codecs_gir0.full_path(), 'dxva': dxva_gir0.full_path(), - 'mse': mse_gir0.full_path(), 'analytics': analytics_gir0.full_path(), } @@ -137,10 +136,14 @@ codecparsers_gir0, codecs_gir0, dxva_gir0, - mse_gir0, analytics_gir0, + if gstmse_private_test_dep.found() + libs_doc_gi_conf += {'mse': mse_gir0.full_path()} + libs_doc_depends += mse_gir0 + endif + if get_variable('gst_cuda_gir', ).length() > 0 libs_doc_gi_conf += {'cuda': gst_cuda_gir0.full_path()} libs_doc_depends += gst_cuda_gir0
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/bz2/gstbz2dec.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/bz2/gstbz2dec.h
Changed
@@ -32,8 +32,7 @@ typedef struct _GstBz2decClass GstBz2decClass; GType -gst_bz2dec_get_type (void) - G_GNUC_CONST; +gst_bz2dec_get_type (void); GST_ELEMENT_REGISTER_DECLARE (bz2dec);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/bz2/gstbz2enc.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/bz2/gstbz2enc.h
Changed
@@ -32,8 +32,7 @@ typedef struct _GstBz2encClass GstBz2encClass; GType -gst_bz2enc_get_type (void) - G_GNUC_CONST; +gst_bz2enc_get_type (void); GST_ELEMENT_REGISTER_DECLARE (bz2enc);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/dtls/gstdtlsagent.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/dtls/gstdtlsagent.h
Changed
@@ -61,7 +61,7 @@ GstObjectClass parent_class; }; -GType gst_dtls_agent_get_type(void) G_GNUC_CONST; +GType gst_dtls_agent_get_type(void); /* * Returns the certificate used by the agent.
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/dtls/gstdtlscertificate.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/dtls/gstdtlscertificate.h
Changed
@@ -60,7 +60,7 @@ GObjectClass parent_class; }; -GType gst_dtls_certificate_get_type(void) G_GNUC_CONST; +GType gst_dtls_certificate_get_type(void); /* internal */ GstDtlsCertificateInternalCertificate _gst_dtls_certificate_get_internal_certificate(GstDtlsCertificate *);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/dtls/gstdtlsconnection.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/dtls/gstdtlsconnection.c
Changed
@@ -1230,8 +1230,9 @@ internal_size = priv->bio_buffer_len - priv->bio_buffer_offset; if (!priv->bio_buffer) { - GST_LOG_OBJECT (self, "BIO: EOF"); - return 0; + GST_LOG_OBJECT (self, "BIO: no data available, retry later"); + BIO_set_retry_read (bio); + return -1; } if (!out_buffer || size <= 0) {
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/dtls/gstdtlsconnection.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/dtls/gstdtlsconnection.h
Changed
@@ -94,7 +94,7 @@ GstObjectClass parent_class; }; -GType gst_dtls_connection_get_type(void) G_GNUC_CONST; +GType gst_dtls_connection_get_type(void); gboolean gst_dtls_connection_start(GstDtlsConnection *, gboolean is_client, GError **err); void gst_dtls_connection_check_timeout(GstDtlsConnection *);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/gtk/gstgtkwaylandsink.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/gtk/gstgtkwaylandsink.c
Changed
@@ -1406,6 +1406,13 @@ } done: { + /* waylandsink is late by one frame on drop reporting. This is typically not + * an issue, unless this is a preroll, since otherwise basesink believes the + * preroll have fail and aborts the state change to playing, stalling the pipeline. + */ + if (ret == GST_BASE_SINK_FLOW_DROPPED && GST_BASE_SINK (self)->need_preroll) + ret = GST_FLOW_OK; + g_mutex_unlock (&priv->render_lock); return ret; }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/onnx/gstonnxinference.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/onnx/gstonnxinference.c
Changed
@@ -730,6 +730,12 @@ gchar *tensor_name = NULL; + if (!api) { + GST_ELEMENT_ERROR (self, LIBRARY, FAILED, (NULL), + ("ORT_API_VERSION %d not supported by ONNX runtime", ORT_API_VERSION)); + return FALSE; + } + GST_OBJECT_LOCK (self); if (self->session) { ret = TRUE; @@ -737,9 +743,10 @@ } if (self->model_file == NULL) { + GST_OBJECT_UNLOCK (self); GST_ELEMENT_ERROR (self, STREAM, FAILED, (NULL), ("model-file property not set")); - goto done; + goto error_no_lock; } modelinfo = gst_analytics_modelinfo_load (self->model_file); @@ -749,11 +756,6 @@ "or invalid file format.", self->model_file); goto error; } - - if (self->session) { - ret = TRUE; - goto done; - } // Create environment OrtLoggingLevel ort_logging; @@ -813,10 +815,11 @@ status = api->SetSessionGraphOptimizationLevel (session_options, onnx_optim); if (status) { + GST_OBJECT_UNLOCK (self); GST_ELEMENT_ERROR (self, STREAM, FAILED, (NULL), ("Failed to set optimization level: %s", api->GetErrorMessage (status))); - goto error; + goto error_no_lock; } // Set execution provider switch (self->execution_provider) { @@ -946,7 +949,7 @@ status = api->SessionGetOutputCount (self->session, &self->output_count); if (status) { - GST_ERROR_OBJECT (self, "Could to retrieve output count: %s", + GST_ERROR_OBJECT (self, "Failed to retrieve output count: %s", api->GetErrorMessage (status)); goto error; } @@ -1159,18 +1162,15 @@ /* Get dimensions from ONNX */ int64_t *shape = (int64_t *) g_alloca (card * sizeof (int64_t)); - output_dims = (gsize *) g_malloc0 (card * sizeof (gsize)); status = api->GetDimensions (output_tensor_info, shape, card); if (status) { GST_ERROR_OBJECT (self, "Failed to get output tensor (%s) dimensions", self->output_namesi); - api->ReleaseStatus (status); - status = NULL; - g_free (output_dims); api->ReleaseTypeInfo (output_type_info); goto error; } + output_dims = (gsize *) g_malloc0 (card * sizeof (gsize)); for (j = 0; j < card; j++) { output_dimsj = shapej > 0 ? shapej : G_MAXSIZE; } @@ -1319,6 +1319,8 @@ return ret; error: + GST_OBJECT_UNLOCK (self); +error_no_lock: if (status) api->ReleaseStatus (status); if (input_type_info) @@ -1328,7 +1330,6 @@ if (modelinfo) gst_analytics_modelinfo_free (modelinfo); - GST_OBJECT_UNLOCK (self); gst_onnx_inference_stop (trans); return ret;
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/opencv/gstcameracalibrate.cpp -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/opencv/gstcameracalibrate.cpp
Changed
@@ -85,6 +85,9 @@ #include <opencv2/imgproc.hpp> #include <opencv2/calib3d.hpp> +#if CV_MAJOR_VERSION >= 5 +#include <opencv2/objdetect.hpp> +#endif #include <gst/opencv/gstopencvutils.h>
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/opencv/gstfaceblur.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/opencv/gstfaceblur.h
Changed
@@ -51,7 +51,11 @@ #include <gst/opencv/gstopencvvideofilter.h> #include <opencv2/core.hpp> +#if CV_MAJOR_VERSION < 5 #include <opencv2/objdetect.hpp> +#else +#include <opencv2/xobjdetect.hpp> +#endif G_BEGIN_DECLS /* #defines don't like whitespacey bits */
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/opencv/gstfacedetect.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/opencv/gstfacedetect.h
Changed
@@ -51,7 +51,11 @@ #include <gst/gst.h> #include <gst/opencv/gstopencvvideofilter.h> +#if CV_MAJOR_VERSION < 5 #include <opencv2/objdetect.hpp> +#else +#include <opencv2/xobjdetect.hpp> +#endif G_BEGIN_DECLS /* #defines don't like whitespacey bits */
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/opencv/gsthanddetect.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/opencv/gsthanddetect.h
Changed
@@ -48,7 +48,11 @@ #include <gst/opencv/gstopencvvideofilter.h> /* opencv */ #include <opencv2/core.hpp> +#if CV_MAJOR_VERSION < 5 #include <opencv2/objdetect.hpp> +#else +#include <opencv2/xobjdetect.hpp> +#endif G_BEGIN_DECLS /* #defines don't like whitespacey bits */
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/opencv/gstsegmentation.cpp -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/opencv/gstsegmentation.cpp
Changed
@@ -91,6 +91,9 @@ #include "gstsegmentation.h" #include <opencv2/imgproc.hpp> +#if CV_MAJOR_VERSION >= 5 +#include <opencv2/geometry.hpp> +#endif GST_DEBUG_CATEGORY_STATIC (gst_segmentation_debug); #define GST_CAT_DEFAULT gst_segmentation_debug
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/openjpeg/gstopenjpeg.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/openjpeg/gstopenjpeg.h
Changed
@@ -33,7 +33,7 @@ OPENJPEG_ERROR_MAP_READ, OPENJPEG_ERROR_MAP_WRITE, OPENJPEG_ERROR_FILL_IMAGE, - OPENJPEG_ERROR_NEGOCIATE, + OPENJPEG_ERROR_NEGOTIATE, OPENJPEG_ERROR_ALLOCATE, } OpenJPEGErrorCode;
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/openjpeg/gstopenjpegdec.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/openjpeg/gstopenjpegdec.c
Changed
@@ -423,13 +423,12 @@ fill_frame_packed8_4 (GstOpenJPEGDec * self, GstVideoFrame * frame, opj_image_t * image) { - gint x, y, y0, y1, w, c; + gint x, x0, x1, y, y0, y1, c; guint8 *data_out, *tmp; const gint *data_in4; - gint dstride; + gsize dstride; gint off4; - w = GST_VIDEO_FRAME_WIDTH (frame); data_out = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); dstride = GST_VIDEO_FRAME_PLANE_STRIDE (frame, 0); @@ -438,14 +437,24 @@ offc = 0x80 * image->compsc.sgnd; } - /* copy only the stripe content (image) to the full size frame */ + x0 = image->x0; + x1 = image->x1; y0 = image->y0; y1 = image->y1; + GST_DEBUG_OBJECT (self, "xo=%d x1=%d", x0, x1); GST_DEBUG_OBJECT (self, "yo=%d y1=%d", y0, y1); - data_out += y0 * dstride; + + if (self->num_stripes > 1) { + x0 = MIN (x0, self->output_state->info.width); + x1 = CLAMP (x1, x0, self->output_state->info.width); + y0 = MIN (y0, self->output_state->info.height); + y1 = CLAMP (y1, y0, self->output_state->info.height); + data_out += y0 * dstride; + } + for (y = y0; y < y1; y++) { tmp = data_out; - for (x = 0; x < w; x++) { + for (x = x0; x < x1; x++) { /* alpha, from 4'th input channel */ tmp0 = off3 + *data_in3; /* colour channels */ @@ -467,13 +476,12 @@ fill_frame_packed16_4 (GstOpenJPEGDec * self, GstVideoFrame * frame, opj_image_t * image) { - gint x, y, y0, y1, w, c; + gint x, x0, x1, y, y0, y1, c; guint16 *data_out, *tmp; const gint *data_in4; - gint dstride; + gsize dstride; gint shift4, off4; - w = GST_VIDEO_FRAME_WIDTH (frame); data_out = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); dstride = GST_VIDEO_FRAME_PLANE_STRIDE (frame, 0) / 2; @@ -485,12 +493,24 @@ 8), 0); } + x0 = image->x0; + x1 = image->x1; y0 = image->y0; y1 = image->y1; - data_out += y0 * dstride; + GST_DEBUG_OBJECT (self, "xo=%d x1=%d", x0, x1); + GST_DEBUG_OBJECT (self, "yo=%d y1=%d", y0, y1); + + if (self->num_stripes > 1) { + x0 = MIN (x0, self->output_state->info.width); + x1 = CLAMP (x1, x0, self->output_state->info.width); + y0 = MIN (y0, self->output_state->info.height); + y1 = CLAMP (y1, y0, self->output_state->info.height); + data_out += y0 * dstride; + } + for (y = y0; y < y1; y++) { tmp = data_out; - for (x = 0; x < w; x++) { + for (x = x0; x < x1; x++) { /* alpha, from 4'th input channel */ tmp0 = off3 + (*data_in3 << shift3); /* colour channels */ @@ -512,13 +532,12 @@ fill_frame_packed8_3 (GstOpenJPEGDec * self, GstVideoFrame * frame, opj_image_t * image) { - gint x, y, y0, y1, w, c; + gint x, y, x0, x1, y0, y1, c; guint8 *data_out, *tmp; const gint *data_in3; - gint dstride; + gsize dstride; gint off3; - w = GST_VIDEO_FRAME_WIDTH (frame); data_out = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); dstride = GST_VIDEO_FRAME_PLANE_STRIDE (frame, 0); @@ -526,12 +545,25 @@ data_inc = image->compsc.data; offc = 0x80 * image->compsc.sgnd; }; + + x0 = image->x0; + x1 = image->x1; y0 = image->y0; y1 = image->y1; - data_out += y0 * dstride; + GST_DEBUG_OBJECT (self, "xo=%d x1=%d", x0, x1); + GST_DEBUG_OBJECT (self, "yo=%d y1=%d", y0, y1); + + if (self->num_stripes > 1) { + x0 = MIN (x0, self->output_state->info.width); + x1 = CLAMP (x1, x0, self->output_state->info.width); + y0 = MIN (y0, self->output_state->info.height); + y1 = CLAMP (y1, y0, self->output_state->info.height); + data_out += y0 * dstride; + } + for (y = y0; y < y1; y++) { tmp = data_out; - for (x = 0; x < w; x++) { + for (x = x0; x < x1; x++) { tmp0 = off0 + *data_in0; tmp1 = off1 + *data_in1; tmp2 = off2 + *data_in2; @@ -590,13 +622,12 @@ fill_frame_packed8_2 (GstOpenJPEGDec * self, GstVideoFrame * frame, opj_image_t * image) { - gint x, y, y0, y1, w, c; + gint x, y, x0, x1, y0, y1, c; guint8 *data_out, *tmp; const gint *data_in2; - gint dstride; + gsize dstride; gint off2; - w = GST_VIDEO_FRAME_WIDTH (frame); data_out = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); dstride = GST_VIDEO_FRAME_PLANE_STRIDE (frame, 0); @@ -605,12 +636,24 @@ offc = 0x80 * image->compsc.sgnd; }; + x0 = image->x0; + x1 = image->x1; y0 = image->y0; y1 = image->y1; - data_out += y0 * dstride; + GST_DEBUG_OBJECT (self, "xo=%d x1=%d", x0, x1); + GST_DEBUG_OBJECT (self, "yo=%d y1=%d", y0, y1); + + if (self->num_stripes > 1) { + x0 = MIN (x0, self->output_state->info.width); + x1 = CLAMP (x1, x0, self->output_state->info.width); + y0 = MIN (y0, self->output_state->info.height); + y1 = CLAMP (y1, y0, self->output_state->info.height); + data_out += y0 * dstride; + } + for (y = y0; y < y1; y++) { tmp = data_out; - for (x = 0; x < w; x++) { + for (x = x0; x < x1; x++) { /* alpha, from 2nd input channel */ tmp0 = off1 + *data_in1; /* luminance, from first input channel */ @@ -630,13 +673,12 @@ fill_frame_packed16_2 (GstOpenJPEGDec * self, GstVideoFrame * frame, opj_image_t * image) { - gint x, y, y0, y1, w, c; + gint x, y, x0, x1, y0, y1, c; guint16 *data_out, *tmp; const gint *data_in2; - gint dstride; + gsize dstride; gint shift2, off2; - w = GST_VIDEO_FRAME_WIDTH (frame); data_out = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); dstride = GST_VIDEO_FRAME_PLANE_STRIDE (frame, 0) / 2; @@ -648,12 +690,24 @@ 8), 0); } + x0 = image->x0; + x1 = image->x1; y0 = image->y0; y1 = image->y1; - data_out += y0 * dstride; + GST_DEBUG_OBJECT (self, "xo=%d x1=%d", x0, x1); + GST_DEBUG_OBJECT (self, "yo=%d y1=%d", y0, y1); + + if (self->num_stripes > 1) { + x0 = MIN (x0, self->output_state->info.width); + x1 = CLAMP (x1, x0, self->output_state->info.width); + y0 = MIN (y0, self->output_state->info.height); + y1 = CLAMP (y1, y0, self->output_state->info.height); + data_out += y0 * dstride; + } + for (y = y0; y < y1; y++) { tmp = data_out; - for (x = 0; x < w; x++) { + for (x = x0; x < x1; x++) { /* alpha, from 2nd input channel */ tmp0 = off1 + (*data_in1 << shift1); /* luminance, from first input channel */ @@ -673,25 +727,36 @@ fill_frame_planar8_1 (GstOpenJPEGDec * self, GstVideoFrame * frame, opj_image_t * image) { - gint x, y, y0, y1, w; + gint x, y, x0, x1, y0, y1; guint8 *data_out, *tmp; const gint *data_in; - gint dstride; + gsize dstride; gint off; - w = GST_VIDEO_FRAME_WIDTH (frame); data_out = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); dstride = GST_VIDEO_FRAME_PLANE_STRIDE (frame, 0); data_in = image->comps0.data; off = 0x80 * image->comps0.sgnd; + x0 = image->x0; + x1 = image->x1; y0 = image->y0; y1 = image->y1; - data_out += y0 * dstride; + GST_DEBUG_OBJECT (self, "xo=%d x1=%d", x0, x1); + GST_DEBUG_OBJECT (self, "yo=%d y1=%d", y0, y1); + + if (self->num_stripes > 1) { + x0 = MIN (x0, self->output_state->info.width); + x1 = CLAMP (x1, x0, self->output_state->info.width); + y0 = MIN (y0, self->output_state->info.height); + y1 = CLAMP (y1, y0, self->output_state->info.height); + data_out += y0 * dstride; + } + for (y = y0; y < y1; y++) { tmp = data_out; - for (x = 0; x < w; x++) + for (x = x0; x < x1; x++) *tmp++ = off + *data_in++; data_out += dstride; } @@ -701,13 +766,12 @@ fill_frame_planar16_1 (GstOpenJPEGDec * self, GstVideoFrame * frame, opj_image_t * image) { - gint x, y, y0, y1, w; + gint x, y, x0, x1, y0, y1; guint16 *data_out, *tmp; const gint *data_in; - gint dstride; + gsize dstride; gint shift, off; - w = GST_VIDEO_FRAME_WIDTH (frame); data_out = GST_VIDEO_FRAME_PLANE_DATA (frame, 0); dstride = GST_VIDEO_FRAME_PLANE_STRIDE (frame, 0) / 2; @@ -718,12 +782,24 @@ MAX (MIN (GST_VIDEO_FRAME_COMP_DEPTH (frame, 0) - image->comps0.prec, 8), 0); + x0 = image->x0; + x1 = image->x1; y0 = image->y0; y1 = image->y1; - data_out += y0 * dstride; + GST_DEBUG_OBJECT (self, "xo=%d x1=%d", x0, x1); + GST_DEBUG_OBJECT (self, "yo=%d y1=%d", y0, y1); + + if (self->num_stripes > 1) { + x0 = MIN (x0, self->output_state->info.width); + x1 = CLAMP (x1, x0, self->output_state->info.width); + y0 = MIN (y0, self->output_state->info.height); + y1 = CLAMP (y1, y0, self->output_state->info.height); + data_out += y0 * dstride; + } + for (y = y0; y < y1; y++) { tmp = data_out; - for (x = 0; x < w; x++) + for (x = x0; x < x1; x++) *tmp++ = off + (*data_in++ << shift); data_out += dstride; } @@ -733,27 +809,45 @@ fill_frame_planar8_3 (GstOpenJPEGDec * self, GstVideoFrame * frame, opj_image_t * image) { - gint c, x, y, y0, y1, w; + gint c, x, y, x0, x1, y0, y1; guint8 *data_out, *tmp; const gint *data_in; - gint dstride, off; + gsize dstride; + gint off; + + x0 = image->x0; + x1 = image->x1; + y0 = image->y0; + y1 = image->y1; + GST_DEBUG_OBJECT (self, "xo=%d x1=%d", x0, x1); + GST_DEBUG_OBJECT (self, "yo=%d y1=%d", y0, y1); + + if (self->num_stripes > 1) { + x0 = MIN (x0, self->output_state->info.width); + x1 = CLAMP (x1, x0, self->output_state->info.width); + y0 = MIN (y0, self->output_state->info.height); + y1 = CLAMP (y1, y0, self->output_state->info.height); + } for (c = 0; c < 3; c++) { opj_image_comp_t *comp = image->comps + c; + gint x0_c, x1_c, y0_c, y1_c; - w = GST_VIDEO_FRAME_COMP_WIDTH (frame, c); dstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, c); data_out = GST_VIDEO_FRAME_COMP_DATA (frame, c); data_in = comp->data; off = 0x80 * comp->sgnd; - /* copy only the stripe content (image) to the full size frame */ - y0 = comp->y0; - y1 = comp->y0 + comp->h; - data_out += y0 * dstride; - for (y = y0; y < y1; y++) { + x0_c = x0 / comp->dx; + x1_c = x1 / comp->dx; + y0_c = y0 / comp->dy; + y1_c = y1 / comp->dy; + if (self->num_stripes > 1) + data_out += y0_c * dstride; + + for (y = y0_c; y < y1_c; y++) { tmp = data_out; - for (x = 0; x < w; x++) + for (x = x0_c; x < x1_c; x++) *tmp++ = off + *data_in++; data_out += dstride; } @@ -764,16 +858,30 @@ fill_frame_planar16_3 (GstOpenJPEGDec * self, GstVideoFrame * frame, opj_image_t * image) { - gint c, x, y, y0, y1, w; + gint c, x, y, x0, x1, y0, y1; guint16 *data_out, *tmp; const gint *data_in; - gint dstride; + gsize dstride; gint shift, off; + x0 = image->x0; + x1 = image->x1; + y0 = image->y0; + y1 = image->y1; + GST_DEBUG_OBJECT (self, "xo=%d x1=%d", x0, x1); + GST_DEBUG_OBJECT (self, "yo=%d y1=%d", y0, y1); + + if (self->num_stripes > 1) { + x0 = MIN (x0, self->output_state->info.width); + x1 = CLAMP (x1, x0, self->output_state->info.width); + y0 = MIN (y0, self->output_state->info.height); + y1 = CLAMP (y1, y0, self->output_state->info.height); + } + for (c = 0; c < 3; c++) { opj_image_comp_t *comp = image->comps + c; + gint x0_c, x1_c, y0_c, y1_c; - w = GST_VIDEO_FRAME_COMP_WIDTH (frame, c); dstride = GST_VIDEO_FRAME_COMP_STRIDE (frame, c) / 2; data_out = (guint16 *) GST_VIDEO_FRAME_COMP_DATA (frame, c); data_in = comp->data; @@ -781,13 +889,16 @@ shift = MAX (MIN (GST_VIDEO_FRAME_COMP_DEPTH (frame, c) - comp->prec, 8), 0); - /* copy only the stripe content (image) to the full size frame */ - y0 = comp->y0; - y1 = comp->y0 + comp->h; - data_out += y0 * dstride; - for (y = y0; y < y1; y++) { + x0_c = x0 / comp->dx; + x1_c = x1 / comp->dx; + y0_c = y0 / comp->dy; + y1_c = y1 / comp->dy; + if (self->num_stripes > 1) + data_out += y0_c * dstride; + + for (y = y0_c; y < y1_c; y++) { tmp = data_out; - for (x = 0; x < w; x++) + for (x = x0_c; x < x1_c; x++) *tmp++ = off + (*data_in++ << shift); data_out += dstride; } @@ -798,10 +909,10 @@ fill_frame_planar8_3_generic (GstOpenJPEGDec * self, GstVideoFrame * frame, opj_image_t * image) { - gint x, y, y0, y1, w, c; + gint x, y, x0, x1, y0, y1, w, c; guint8 *data_out, *tmp; const gint *data_in3; - gint dstride; + gsize dstride; gint dx3, dy3, off3; w = GST_VIDEO_FRAME_WIDTH (frame); @@ -815,9 +926,23 @@ offc = 0x80 * image->compsc.sgnd; } + x0 = image->x0; + x1 = image->x1; y0 = image->y0; y1 = image->y1; - data_out += y0 * dstride; + GST_DEBUG_OBJECT (self, "xo=%d x1=%d", x0, x1); + GST_DEBUG_OBJECT (self, "yo=%d y1=%d", y0, y1); + + if (self->num_stripes > 1) { + x0 = MIN (x0, self->output_state->info.width); + x1 = CLAMP (x1, x0, self->output_state->info.width); + y0 = MIN (y0, self->output_state->info.height); + y1 = CLAMP (y1, y0, self->output_state->info.height); + data_out += y0 * dstride; + } + + w = x1 - x0; + for (y = y0; y < y1; y++) { tmp = data_out; for (x = 0; x < w; x++) { @@ -835,13 +960,12 @@ fill_frame_planar16_3_generic (GstOpenJPEGDec * self, GstVideoFrame * frame, opj_image_t * image) { - gint x, y, y0, y1, w, c; + gint x, y, x0, x1, y0, y1, c, w; guint16 *data_out, *tmp; const gint *data_in3; - gint dstride; + gsize dstride; gint dx3, dy3, shift3, off3; - w = GST_VIDEO_FRAME_WIDTH (frame); data_out = (guint16 *) GST_VIDEO_FRAME_PLANE_DATA (frame, 0); dstride = GST_VIDEO_FRAME_PLANE_STRIDE (frame, 0) / 2; @@ -855,9 +979,23 @@ 8), 0); } + x0 = image->x0; + x1 = image->x1; y0 = image->y0; y1 = image->y1; - data_out += y0 * dstride; + GST_DEBUG_OBJECT (self, "xo=%d x1=%d", x0, x1); + GST_DEBUG_OBJECT (self, "yo=%d y1=%d", y0, y1); + + if (self->num_stripes > 1) { + x0 = MIN (x0, self->output_state->info.width); + x1 = CLAMP (x1, x0, self->output_state->info.width); + y0 = MIN (y0, self->output_state->info.height); + y1 = CLAMP (y1, y0, self->output_state->info.height); + data_out += y0 * dstride; + } + + w = x1 - x0; + for (y = y0; y < y1; y++) { tmp = data_out; for (x = 0; x < w; x++) { @@ -1095,16 +1233,27 @@ return GST_FLOW_NOT_NEGOTIATED; } + /* For striped input we have to assume that the upstream caps are correct, + * otherwise we can take the signalled image dimensions directly and don't + * have to rely on the upstream caps at all. */ + guint width; + guint height; + if (self->num_stripes == 1) { + width = image->x1 - image->x0; + height = image->y1 - image->y0; + } else { + width = self->input_state->info.width; + height = self->input_state->info.height; + } if (!self->output_state || self->output_state->info.finfo->format != format || - self->output_state->info.width != self->input_state->info.width || - self->output_state->info.height != self->input_state->info.height) { + self->output_state->info.width != width || + self->output_state->info.height != height) { if (self->output_state) gst_video_codec_state_unref (self->output_state); self->output_state = gst_video_decoder_set_output_state (GST_VIDEO_DECODER (self), format, - self->input_state->info.width, self->input_state->info.height, - self->input_state); + width, height, self->input_state); if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (self))) return GST_FLOW_NOT_NEGOTIATED; } @@ -1397,8 +1546,8 @@ GstOpenJPEGDec *self = GST_OPENJPEG_DEC (element); GstVideoDecoder *decoder = GST_VIDEO_DECODER (element); GstOpenJPEGCodecMessage *message = (GstOpenJPEGCodecMessage *) user_data; - GstMapInfo map; - GstVideoFrame vframe; + GstMapInfo map = GST_MAP_INFO_INIT; + GstVideoFrame vframe = GST_VIDEO_FRAME_INIT; opj_codec_t *dec = NULL; opj_stream_t *stream = NULL; MemStream mstream; @@ -1480,7 +1629,7 @@ ret = gst_openjpeg_dec_negotiate (self, image); if (ret != GST_FLOW_OK) - DECODE_ERROR (self, message, OPENJPEG_ERROR_NEGOCIATE, TRUE); + DECODE_ERROR (self, message, OPENJPEG_ERROR_NEGOTIATE, TRUE); if (message->frame->output_buffer == NULL) { ret = gst_video_decoder_allocate_output_frame (decoder, message->frame); @@ -1512,6 +1661,11 @@ g_cond_broadcast (&self->messages_cond); } + if (vframe.buffer) + gst_video_frame_unmap (&vframe); + if (map.memory) + gst_buffer_unmap (message->input_buffer, &map); + if (stream) { opj_end_decompress (dec, stream); opj_stream_destroy (stream); @@ -1691,9 +1845,9 @@ GST_ELEMENT_ERROR (self, LIBRARY, INIT, ("Failed to decode OpenJPEG data"), (NULL)); break; - case OPENJPEG_ERROR_NEGOCIATE: + case OPENJPEG_ERROR_NEGOTIATE: GST_ELEMENT_ERROR (self, LIBRARY, INIT, - ("Failed to negociate OpenJPEG data"), (NULL)); + ("Failed to negotiate OpenJPEG data"), (NULL)); break; case OPENJPEG_ERROR_ALLOCATE: GST_ELEMENT_ERROR (self, LIBRARY, INIT, @@ -1701,7 +1855,7 @@ break; default: GST_ELEMENT_ERROR (self, LIBRARY, INIT, - ("Failed to encode OpenJPEG data"), (NULL)); + ("Failed to decode OpenJPEG data"), (NULL)); break; }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/resindvd/gstmpegdemux.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/resindvd/gstmpegdemux.c
Changed
@@ -25,6 +25,7 @@ #include <string.h> +#include <gst/base/gstbytereader.h> #include <gst/video/video.h> #include <gst/tag/tag.h> #include <gst/pbutils/pbutils.h> @@ -1293,6 +1294,7 @@ static GstFlowReturn gst_flups_demux_parse_pack_start (GstFluPSDemux * demux) { + GstByteReader br; const guint8 *data; guint length; guint32 scr1, scr2; @@ -1301,6 +1303,7 @@ guint64 scr_rate_d; GstClockTime new_time; guint avail = gst_adapter_available (demux->adapter); + guint8 b; GST_LOG ("parsing pack start"); @@ -1308,18 +1311,19 @@ goto need_more_data; data = gst_adapter_map (demux->adapter, PACK_START_SIZE); + gst_byte_reader_init (&br, data, PACK_START_SIZE); /* skip start code */ - data += 4; + gst_byte_reader_skip_unchecked (&br, 4); - scr1 = GST_READ_UINT32_BE (data); - scr2 = GST_READ_UINT32_BE (data + 4); + scr1 = gst_byte_reader_get_uint32_be_unchecked (&br); /* fixed length to begin with, start code and two scr values */ - length = 8 + 4; + length = 4 + 8; /* start parsing the stream */ - if ((*data & 0xc0) == 0x40) { + /* MPEG2: first 2 bits of scr1 are '01' */ + if ((scr1 & 0xc0000000) == 0x40000000) { guint32 scr_ext; guint32 next32; guint8 stuffing_bytes; @@ -1330,6 +1334,10 @@ /* mpeg2 has more data */ length += 2; + /* Peek scr2 at bytes 8-11 without advancing (next32 overlaps at bytes 10-13) */ + if (!gst_byte_reader_peek_uint32_be (&br, &scr2)) + goto fail_invalid; + /* :2=01 ! scr:3 ! marker:1==1 ! scr:15 ! marker:1==1 ! scr:15 */ /* check markers */ @@ -1339,9 +1347,8 @@ scr = ((guint64) scr1 & 0x38000000) << 3; scr |= ((guint64) scr1 & 0x03fff800) << 4; scr |= ((guint64) scr1 & 0x000003ff) << 5; - scr |= ((guint64) scr2 & 0xf8000000) >> 27; - /* marker:1==1 ! scr_ext:9 ! marker:1==1 */ + scr |= ((guint64) scr2 & 0xf8000000) >> 27; if (G_UNLIKELY ((scr2 & 0x04010000) != 0x04010000)) goto lost_sync; @@ -1357,9 +1364,14 @@ } /* SCR has been converted into units of 90Khz ticks to make it comparable to DTS/PTS, that also implies 1 tick rounding error */ - data += 6; + + /* Skip to byte 10 (scr2 peeks at bytes 8-11, next32 overlaps at bytes 10-13) */ + if (!gst_byte_reader_skip (&br, 2)) + goto fail_invalid; + /* PMR:22 ! :2==11 ! reserved:5 ! stuffing_len:3 */ - next32 = GST_READ_UINT32_BE (data); + if (!gst_byte_reader_get_uint32_be (&br, &next32)) + goto fail_invalid; if (G_UNLIKELY ((next32 & 0x00000300) != 0x00000300)) goto lost_sync; @@ -1368,13 +1380,18 @@ stuffing_bytes = (next32 & 0x07); GST_LOG_OBJECT (demux, "stuffing bytes: %d", stuffing_bytes); - data += 4; length += stuffing_bytes; while (stuffing_bytes--) { - if (*data++ != 0xff) + if (!gst_byte_reader_get_uint8 (&br, &b)) + goto fail_invalid; + if (b != 0xff) goto lost_sync; } } else { + /* MPEG-1 pack header */ + if (!gst_byte_reader_get_uint32_be (&br, &scr2)) + goto fail_invalid; + GST_DEBUG ("Found MPEG1 stream"); demux->is_mpeg2_pack = FALSE; @@ -1520,6 +1537,13 @@ ADAPTER_OFFSET_FLUSH (length); return GST_FLOW_OK; +fail_invalid: + GST_DEBUG_OBJECT (demux, "Failed to parse pack start. Skipping"); + gst_adapter_unmap (demux->adapter); + gst_adapter_flush (demux->adapter, length); + ADAPTER_OFFSET_FLUSH (length); + return GST_FLOW_LOST_SYNC; + lost_sync: { GST_DEBUG_OBJECT (demux, "lost sync"); @@ -1563,11 +1587,14 @@ gst_flups_demux_parse_sys_head (GstFluPSDemux * demux) { guint16 length; + guint8 byte_val; + GstByteReader br; const guint8 *data; #ifndef GST_DISABLE_GST_DEBUG gboolean csps; #endif + /* Need at least 6 bytes for start code + length */ if (gst_adapter_available (demux->adapter) < 6) goto need_more_data; @@ -1580,6 +1607,10 @@ length = GST_READ_UINT16_BE (data); GST_DEBUG_OBJECT (demux, "length %d", length); + /* Minimum header_length is 6 (96 bits of fixed header after start code + length) */ + if (G_UNLIKELY (length < 6)) + goto sys_len_error; + length += 6; gst_adapter_unmap (demux->adapter); @@ -1588,27 +1619,34 @@ data = gst_adapter_map (demux->adapter, length); + gst_byte_reader_init (&br, data, length); + /* skip start code and length */ - data += 6; + if (!gst_byte_reader_skip (&br, 6)) + goto fail_invalid; /* marker:1==1 ! rate_bound:22 | marker:1==1 */ - if ((*data & 0x80) != 0x80) + if (!gst_byte_reader_get_uint8 (&br, &byte_val)) + goto fail_invalid; + if ((byte_val & 0x80) != 0x80) goto marker_expected; { guint32 rate_bound; + guint8 b1, b2; - if ((data2 & 0x01) != 0x01) + if (!gst_byte_reader_get_uint8 (&br, &b1) || + !gst_byte_reader_get_uint8 (&br, &b2)) + goto fail_invalid; + if ((b2 & 0x01) != 0x01) goto marker_expected; - rate_bound = ((guint32) data0 & 0x7f) << 15; - rate_bound |= ((guint32) data1) << 7; - rate_bound |= ((guint32) data2 & 0xfe) >> 1; + rate_bound = ((guint32) byte_val & 0x7f) << 15; + rate_bound |= ((guint32) b1) << 7; + rate_bound |= ((guint32) b2 & 0xfe) >> 1; rate_bound *= MPEG_MUX_RATE_MULT; GST_DEBUG_OBJECT (demux, "rate bound %u", rate_bound); - - data += 3; } /* audio_bound:6==1 ! fixed:1 | constrained:1 */ @@ -1616,18 +1654,22 @@ #ifndef GST_DISABLE_GST_DEBUG guint8 audio_bound; gboolean fixed; +#endif + + if (!gst_byte_reader_get_uint8 (&br, &byte_val)) + goto fail_invalid; +#ifndef GST_DISABLE_GST_DEBUG /* max number of simultaneous audio streams active */ - audio_bound = (data0 & 0xfc) >> 2; + audio_bound = (byte_val & 0xfc) >> 2; /* fixed or variable bitrate */ - fixed = (data0 & 0x02) == 0x02; + fixed = (byte_val & 0x02) == 0x02; /* meeting constraints */ - csps = (data0 & 0x01) == 0x01; + csps = (byte_val & 0x01) == 0x01; GST_DEBUG_OBJECT (demux, "audio_bound %d, fixed %d, constrained %d", audio_bound, fixed, csps); #endif - data += 1; } /* audio_lock:1 | video_lock:1 | marker:1==1 | video_bound:5 */ @@ -1636,22 +1678,26 @@ gboolean audio_lock; gboolean video_lock; guint8 video_bound; +#endif + + if (!gst_byte_reader_get_uint8 (&br, &byte_val)) + goto fail_invalid; - audio_lock = (data0 & 0x80) == 0x80; - video_lock = (data0 & 0x40) == 0x40; +#ifndef GST_DISABLE_GST_DEBUG + audio_lock = (byte_val & 0x80) == 0x80; + video_lock = (byte_val & 0x40) == 0x40; #endif - if ((data0 & 0x20) != 0x20) + if ((byte_val & 0x20) != 0x20) goto marker_expected; #ifndef GST_DISABLE_GST_DEBUG /* max number of simultaneous video streams active */ - video_bound = (data0 & 0x1f); + video_bound = (byte_val & 0x1f); GST_DEBUG_OBJECT (demux, "audio_lock %d, video_lock %d, video_bound %d", audio_lock, video_lock, video_bound); #endif - data += 1; } /* packet_rate_restriction:1 | reserved:7==0x7F */ @@ -1659,56 +1705,74 @@ #ifndef GST_DISABLE_GST_DEBUG gboolean packet_rate_restriction; #endif - if ((data0 & 0x7f) != 0x7f) + + if (!gst_byte_reader_get_uint8 (&br, &byte_val)) + goto fail_invalid; + + if ((byte_val & 0x7f) != 0x7f) goto marker_expected; #ifndef GST_DISABLE_GST_DEBUG /* only valid if csps is set */ if (csps) { - packet_rate_restriction = (data0 & 0x80) == 0x80; + packet_rate_restriction = (byte_val & 0x80) == 0x80; GST_DEBUG_OBJECT (demux, "packet_rate_restriction %d", packet_rate_restriction); } #endif } - data += 1; { - gint stream_count = (length - 12) / 3; - gint i; + guint stream_entries_length; + GstByteReader stream_br; + + stream_entries_length = gst_byte_reader_get_remaining (&br); + GST_DEBUG_OBJECT (demux, "stream entries: number of entries %u, %u bytes", + (length - 12) / 3, stream_entries_length); - GST_DEBUG_OBJECT (demux, "number of streams: %d ", stream_count); + if (!gst_byte_reader_get_sub_reader (&br, &stream_br, + stream_entries_length)) + goto fail_invalid; - for (i = 0; i < stream_count; i++) { + while (gst_byte_reader_get_remaining (&stream_br) >= 3) { guint8 stream_id; #ifndef GST_DISABLE_GST_DEBUG gboolean STD_buffer_bound_scale; guint16 STD_buffer_size_bound; guint32 buf_byte_size_bound; #endif - stream_id = *data++; + + if (!gst_byte_reader_get_uint8 (&stream_br, &stream_id)) + break; if (!(stream_id & 0x80)) goto sys_len_error; - /* check marker bits */ - if ((*data & 0xC0) != 0xC0) - goto no_placeholder_bits; + { + guint16 buffer_info; + + if (!gst_byte_reader_get_uint16_be (&stream_br, &buffer_info)) + break; + + /* check marker bits */ + if ((buffer_info & 0xC000) != 0xC000) + goto no_placeholder_bits; + #ifndef GST_DISABLE_GST_DEBUG - STD_buffer_bound_scale = *data & 0x20; - STD_buffer_size_bound = ((guint16) (*data++ & 0x1F)) << 8; - STD_buffer_size_bound |= *data++; + STD_buffer_bound_scale = (buffer_info & 0x2000) != 0; + STD_buffer_size_bound = buffer_info & 0x1FFF; - if (STD_buffer_bound_scale == 0) { - buf_byte_size_bound = STD_buffer_size_bound * 128; - } else { - buf_byte_size_bound = STD_buffer_size_bound * 1024; - } + if (STD_buffer_bound_scale == 0) { + buf_byte_size_bound = STD_buffer_size_bound * 128; + } else { + buf_byte_size_bound = STD_buffer_size_bound * 1024; + } - GST_DEBUG_OBJECT (demux, "STD_buffer_bound_scale %d", - STD_buffer_bound_scale); - GST_DEBUG_OBJECT (demux, "STD_buffer_size_bound %d or %d bytes", - STD_buffer_size_bound, buf_byte_size_bound); + GST_DEBUG_OBJECT (demux, "STD_buffer_bound_scale %d", + STD_buffer_bound_scale); + GST_DEBUG_OBJECT (demux, "STD_buffer_size_bound %d or %d bytes", + STD_buffer_size_bound, buf_byte_size_bound); #endif + } } } @@ -1718,6 +1782,13 @@ return GST_FLOW_OK; /* ERRORS */ +fail_invalid: + GST_DEBUG_OBJECT (demux, "Failed to parse system header. Skipping"); + gst_adapter_unmap (demux->adapter); + gst_adapter_flush (demux->adapter, length); + ADAPTER_OFFSET_FLUSH (length); + return GST_FLOW_LOST_SYNC; + marker_expected: { GST_DEBUG_OBJECT (demux, "expecting marker"); @@ -1748,42 +1819,48 @@ static GstFlowReturn gst_flups_demux_parse_psm (GstFluPSDemux * demux) { - guint16 length = 0, info_length = 0, es_map_length = 0; + guint16 psm_length, info_length = 0, es_map_length = 0; guint8 psm_version = 0; - const guint8 *data, *es_map_base; + GstByteReader br; #ifndef GST_DISABLE_GST_DEBUG gboolean applicable; #endif + /* Need at least 6 bytes for start code + length */ if (gst_adapter_available (demux->adapter) < 6) goto need_more_data; - /* start code + length */ - data = gst_adapter_map (demux->adapter, 6); - - /* skip start code */ - data += 4; + { + const guint8 *data; - length = GST_READ_UINT16_BE (data); - GST_DEBUG_OBJECT (demux, "length %u", length); + /* start code + length */ + data = gst_adapter_map (demux->adapter, 6); + /* skip start code */ + data += 4; + psm_length = GST_READ_UINT16_BE (data); + GST_DEBUG_OBJECT (demux, "PSM length %u", psm_length); - if (G_UNLIKELY (length > 0x3FA)) - goto psm_len_error; + if (G_UNLIKELY (psm_length > 0x3FA)) + goto psm_len_error; + psm_length += 6; /* Add start code + size to length */ - length += 6; + gst_adapter_unmap (demux->adapter); - gst_adapter_unmap (demux->adapter); + if (gst_adapter_available (demux->adapter) < psm_length) + goto need_more_data; - if (gst_adapter_available (demux->adapter) < length) - goto need_more_data; + data = gst_adapter_map (demux->adapter, psm_length); - data = gst_adapter_map (demux->adapter, length); + gst_byte_reader_init (&br, data, psm_length); + } /* skip start code and length */ - data += 6; + if (!gst_byte_reader_skip (&br, 6)) + goto fail_invalid; /* Read PSM applicable bit together with version */ - psm_version = GST_READ_UINT8 (data); + if (!gst_byte_reader_get_uint8 (&br, &psm_version)) + goto fail_invalid; #ifndef GST_DISABLE_GST_DEBUG applicable = (psm_version & 0x80) >> 7; #endif @@ -1791,62 +1868,70 @@ GST_DEBUG_OBJECT (demux, "PSM version %u (applicable now %u)", psm_version, applicable); - /* Jump over version and marker bit */ - data += 2; + /* Jump over the next byte (marker bit) */ + if (!gst_byte_reader_skip (&br, 1)) + goto fail_invalid; /* Read PS info length */ - info_length = GST_READ_UINT16_BE (data); - /* Cap it to PSM length - needed bytes for ES map length and CRC */ - info_length = MIN (length - 16, info_length); + if (!gst_byte_reader_get_uint16_be (&br, &info_length)) + goto fail_invalid; GST_DEBUG_OBJECT (demux, "PS info length %u bytes", info_length); - - /* Jump over that section */ - data += (2 + info_length); + /* Skip the PS info, we don't use it */ + if (!gst_byte_reader_skip (&br, info_length)) + goto fail_invalid; /* Read ES map length */ - es_map_length = GST_READ_UINT16_BE (data); - /* Cap it to PSM remaining length - CRC */ - es_map_length = MIN (length - (16 + info_length), es_map_length); + if (!gst_byte_reader_get_uint16_be (&br, &es_map_length)) + goto fail_invalid; GST_DEBUG_OBJECT (demux, "ES map length %u bytes", es_map_length); - /* Jump over the size */ - data += 2; - /* Now read the ES map */ - es_map_base = data; - while (es_map_base + 4 <= data + es_map_length) { - guint8 stream_type = 0, stream_id = 0; - guint16 stream_info_length = 0; - - stream_type = GST_READ_UINT8 (es_map_base); - es_map_base++; - stream_id = GST_READ_UINT8 (es_map_base); - es_map_base++; - stream_info_length = GST_READ_UINT16_BE (es_map_base); - es_map_base += 2; - /* Cap stream_info_length */ - stream_info_length = MIN (data + es_map_length - es_map_base, - stream_info_length); - - GST_DEBUG_OBJECT (demux, "Stream type %02X with id %02X and %u bytes info", - stream_type, stream_id, stream_info_length); - if (G_LIKELY (stream_id != 0xbd)) - demux->psmstream_id = stream_type; - else { - /* Ignore stream type for private_stream_1 and discover it looking at - * the stream data. - * Fixes demuxing some clips with lpcm that was wrongly declared as - * mpeg audio */ - GST_DEBUG_OBJECT (demux, "stream type for private_stream_1 ignored"); + { + GstByteReader es_map_br; + if (!gst_byte_reader_get_sub_reader (&br, &es_map_br, es_map_length)) + goto fail_invalid; + + while (gst_byte_reader_get_remaining (&es_map_br) >= 4) { + guint8 stream_type = 0, stream_id = 0; + guint16 stream_info_length = 0; + + if (!gst_byte_reader_get_uint8 (&es_map_br, &stream_type) || + !gst_byte_reader_get_uint8 (&es_map_br, &stream_id) || + !gst_byte_reader_get_uint16_be (&es_map_br, &stream_info_length)) + break; + + GST_DEBUG_OBJECT (demux, + "Stream type %02X with id %02X and %u bytes info", stream_type, + stream_id, stream_info_length); + + if (G_LIKELY (stream_id != 0xbd)) + demux->psmstream_id = stream_type; + else { + /* Ignore stream type for private_stream_1 and discover it looking at + * the stream data. + * Fixes demuxing some clips with lpcm that was wrongly declared as + * mpeg audio */ + GST_DEBUG_OBJECT (demux, "stream type for private_stream_1 ignored"); + } + + /* FIXME: We could use the descriptors instead of skipping them */ + if (!gst_byte_reader_skip (&es_map_br, stream_info_length)) + break; } - es_map_base += stream_info_length; } + /* We ignore the 4-byte CRC at the end */ gst_adapter_unmap (demux->adapter); - gst_adapter_flush (demux->adapter, length); - ADAPTER_OFFSET_FLUSH (length); + gst_adapter_flush (demux->adapter, psm_length); + ADAPTER_OFFSET_FLUSH (psm_length); return GST_FLOW_OK; +fail_invalid: + GST_DEBUG_OBJECT (demux, "Failed to parse PSM. Skipping"); + gst_adapter_unmap (demux->adapter); + gst_adapter_flush (demux->adapter, psm_length); + ADAPTER_OFFSET_FLUSH (psm_length); + return GST_FLOW_LOST_SYNC; psm_len_error: { GST_DEBUG_OBJECT (demux, "error in PSM length");
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/resindvd/rsndec.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/resindvd/rsndec.h
Changed
@@ -43,9 +43,9 @@ #define RSN_IS_VIDEODEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),RSN_TYPE_VIDEODEC)) #define RSN_IS_VIDEODEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),RSN_TYPE_VIDEODEC)) -GType rsn_dec_get_type (void) G_GNUC_CONST; -GType rsn_audiodec_get_type (void) G_GNUC_CONST; -GType rsn_videodec_get_type (void) G_GNUC_CONST; +GType rsn_dec_get_type (void); +GType rsn_audiodec_get_type (void); +GType rsn_videodec_get_type (void); typedef struct _RsnDec RsnDec; typedef struct _RsnDecClass RsnDecClass;
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/tflite/gsttfliteinference.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/tflite/gsttfliteinference.c
Changed
@@ -79,7 +79,6 @@ GstCaps *model_incaps; GstCaps *model_outcaps; - gint channels; gdouble *scales; gdouble *offsets; @@ -637,7 +636,6 @@ } - gst_clear_caps (&priv->model_incaps); priv->model_incaps = gst_caps_new_empty_simple ("video/x-raw"); if (width && height) gst_caps_set_simple (priv->model_incaps, "width", G_TYPE_INT, width, @@ -669,7 +667,6 @@ goto error; } - gst_clear_caps (&priv->model_outcaps); o_size = TfLiteInterpreterGetOutputTensorCount (priv->interpreter); if (o_size != 0) { @@ -749,6 +746,7 @@ gst_structure_set (tensor_desc, "dims-order", G_TYPE_STRING, dims_order_str, "tensor-id", G_TYPE_STRING, id, NULL); + g_free (id); gst_structure_take_value (tensor_desc, "dims", &val_dims); g_value_unset (&val); @@ -790,6 +788,10 @@ ret = TRUE; done: + if (tensors_s) + gst_structure_free (tensors_s); + if (G_IS_VALUE (&v_tensors_set) && G_VALUE_TYPE (&v_tensors_set)) + g_value_unset (&v_tensors_set); if (modelinfo) gst_analytics_modelinfo_free (modelinfo); @@ -827,6 +829,7 @@ priv->model = NULL; gst_clear_caps (&priv->model_incaps); + gst_clear_caps (&priv->model_outcaps); g_ptr_array_set_size (priv->tensor_templates, 0);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/ttml/gstttmlrender.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/ttml/gstttmlrender.h
Changed
@@ -102,7 +102,7 @@ GMutex *pango_lock; }; -GType gst_ttml_render_get_type(void) G_GNUC_CONST; +GType gst_ttml_render_get_type(void); G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/vulkan/vkav1dec.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/vulkan/vkav1dec.c
Changed
@@ -384,7 +384,7 @@ gst_vulkan_image_buffer_pool_config_set_allocation_params (config, usage, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR, - VK_ACCESS_TRANSFER_WRITE_BIT); + VK_ACCESS_NONE); gst_vulkan_image_buffer_pool_config_set_decode_caps (config, profile_caps); gst_caps_unref (profile_caps);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/vulkan/vkvp9dec.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/vulkan/vkvp9dec.c
Changed
@@ -383,7 +383,7 @@ gst_vulkan_image_buffer_pool_config_set_allocation_params (config, usage, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR, - VK_ACCESS_TRANSFER_WRITE_BIT); + VK_ACCESS_NONE); gst_vulkan_image_buffer_pool_config_set_decode_caps (config, profile_caps); gst_caps_unref (profile_caps);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/wayland/gstwaylandsink.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/wayland/gstwaylandsink.c
Changed
@@ -1251,6 +1251,13 @@ } done: { + /* waylandsink is late by one frame on drop reporting. This is typically not + * an issue, unless this is a preroll, since otherwise basesink believes the + * preroll have fail and aborts the state change to playing, stalling the pipeline. + */ + if (ret == GST_BASE_SINK_FLOW_DROPPED && GST_BASE_SINK (self)->need_preroll) + ret = GST_FLOW_OK; + g_mutex_unlock (&self->render_lock); return ret; }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/wayland/gstwaylandsink.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/wayland/gstwaylandsink.h
Changed
@@ -85,7 +85,7 @@ GstVideoSinkClass parent; }; -GType gst_wayland_sink_get_type (void) G_GNUC_CONST; +GType gst_wayland_sink_get_type (void); GST_ELEMENT_REGISTER_DECLARE (waylandsink);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/ext/webrtc/gstwebrtcbin.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/ext/webrtc/gstwebrtcbin.c
Changed
@@ -5215,7 +5215,9 @@ gboolean aux_success = FALSE; gchar *rtp_pad_name = g_strdup_printf ("send_rtp_src_%u", session_id); if (aux_sender) { - gst_object_ref_sink (aux_sender); + if (g_object_is_floating (aux_sender)) { + aux_sender = gst_object_ref_sink (aux_sender); + } if (!gst_bin_add (GST_BIN (webrtc), aux_sender)) { GST_ERROR_OBJECT (webrtc, "Unable to add aux_sender %" GST_PTR_FORMAT " to webrtcbin"
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/analytics/modelinfo.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/analytics/modelinfo.c
Changed
@@ -518,6 +518,11 @@ GST_DEBUG_CATEGORY_INIT (analytics_modelinfo_debug, "modelinfo", 0, "analytics model info"); + if (!model_filename) { + GST_ERROR ("model_filename is NULL"); + return NULL; + } + filename = g_strconcat (model_filename, ".modelinfo", NULL); ret = g_key_file_load_from_file (kf, filename, G_KEY_FILE_NONE, NULL); g_free (filename);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/codecparsers/gsth265parser.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/codecparsers/gsth265parser.c
Changed
@@ -781,12 +781,19 @@ gint16 deltaRps = 0; gint j, i = 0; gint dPoc; - GstH265ShortTermRefPicSetExt *stRPSEXT = &sps_ext->short_term_ref_pic_set_extstRpsIdx; + /* See num_long_term_pics in 7.4.7.1, NumDeltaPocs should not exceed + * sps_max_dec_pic_buffering_minus1 */ + const guint allowed_max_delta = + sps->max_dec_pic_buffering_minus1sps->max_sub_layers_minus1; GST_DEBUG ("parsing \"ShortTermRefPicSetParameters\""); + /* double check, already checked during max_dec_pic_buffering_minus1 parsing + * though */ + CHECK_ALLOWED_MAX (allowed_max_delta, MAX_DPB_SIZE - 1); + /* set default values for fields that might not be present in the bitstream and have valid defaults */ for (j = 0; j < 16; j++) @@ -812,6 +819,10 @@ RefRPS = &sps->short_term_ref_pic_setRefRpsIdx; stRPS->NumDeltaPocsOfRefRpsIdx = RefRPS->NumDeltaPocs; + CHECK_ALLOWED_MAX (RefRPS->NumDeltaPocs, allowed_max_delta); + CHECK_ALLOWED_MAX (RefRPS->NumPositivePics, allowed_max_delta); + CHECK_ALLOWED_MAX (RefRPS->NumNegativePics, allowed_max_delta); + for (j = 0; j <= RefRPS->NumDeltaPocs; j++) { READ_UINT8 (nr, stRPSEXT->used_by_curr_pic_flagj, 1); if (!stRPSEXT->used_by_curr_pic_flagj) @@ -823,24 +834,41 @@ for (j = (RefRPS->NumPositivePics - 1); j >= 0; j--) { dPoc = RefRPS->DeltaPocS1j + deltaRps; if (dPoc < 0 && stRPSEXT->use_delta_flagRefRPS->NumNegativePics + j) { + CHECK_ALLOWED_MAX (i, allowed_max_delta); stRPS->DeltaPocS0i = dPoc; stRPS->UsedByCurrPicS0i++ = stRPSEXT->used_by_curr_pic_flagRefRPS->NumNegativePics + j; } } + if (deltaRps < 0 && stRPSEXT->use_delta_flagRefRPS->NumDeltaPocs) { + CHECK_ALLOWED_MAX (i, allowed_max_delta); stRPS->DeltaPocS0i = deltaRps; stRPS->UsedByCurrPicS0i++ = stRPSEXT->used_by_curr_pic_flagRefRPS->NumDeltaPocs; } + for (j = 0; j < RefRPS->NumNegativePics; j++) { dPoc = RefRPS->DeltaPocS0j + deltaRps; if (dPoc < 0 && stRPSEXT->use_delta_flagj) { + /* last valid index is "allowed_max_delta - 1" due to + * UsedByCurrPicS0i++, but intentionally checking against + * allowed_max_delta here to avoid handling allowed_max_delta == 0 case. + * + * Since theoretical maximum value of allowed_max_delta is + * 15 (MAX_DPB_SIZE - 1), writing to UsedByCurrPicS0i is still + * safe because i is incremented after the write. + * + * Below NumNegativePics validation will do the final bounds check. + */ + CHECK_ALLOWED_MAX (i, allowed_max_delta); stRPS->DeltaPocS0i = dPoc; stRPS->UsedByCurrPicS0i++ = stRPSEXT->used_by_curr_pic_flagj; } } + stRPS->NumNegativePics = i; + CHECK_ALLOWED_MAX (stRPS->NumNegativePics, allowed_max_delta); /* 7-48: calculate NumPositivePics, DeltaPocS1 and UsedByCurrPicS1 */ i = 0; @@ -852,29 +880,41 @@ } } if (deltaRps > 0 && stRPSEXT->use_delta_flagRefRPS->NumDeltaPocs) { + CHECK_ALLOWED_MAX (i, allowed_max_delta); stRPS->DeltaPocS1i = deltaRps; stRPS->UsedByCurrPicS1i++ = stRPSEXT->used_by_curr_pic_flagRefRPS->NumDeltaPocs; } + for (j = 0; j < RefRPS->NumPositivePics; j++) { dPoc = RefRPS->DeltaPocS1j + deltaRps; if (dPoc > 0 && stRPSEXT->use_delta_flagRefRPS->NumNegativePics + j) { + /* last valid index is "allowed_max_delta - 1" due to + * UsedByCurrPicS1i++, but intentionally checking against + * allowed_max_delta here to avoid handling allowed_max_delta == 0 case. + * + * Since theoretical maximum value of allowed_max_delta is + * 15 (MAX_DPB_SIZE - 1), writing to UsedByCurrPicS1i is still + * safe because i is incremented after the write. + * + * Below NumPositivePics validation will do the final bounds check. + */ + CHECK_ALLOWED_MAX (i, allowed_max_delta); stRPS->DeltaPocS1i = dPoc; stRPS->UsedByCurrPicS1i++ = stRPSEXT->used_by_curr_pic_flagRefRPS->NumNegativePics + j; } } - stRPS->NumPositivePics = i; + stRPS->NumPositivePics = i; + CHECK_ALLOWED_MAX (stRPS->NumPositivePics, allowed_max_delta); } else { /* 7-49 */ - READ_UE_MAX (nr, stRPS->NumNegativePics, - sps->max_dec_pic_buffering_minus1sps->max_sub_layers_minus1); + READ_UE_MAX (nr, stRPS->NumNegativePics, allowed_max_delta); /* 7-50 */ READ_UE_MAX (nr, stRPS->NumPositivePics, - (sps->max_dec_pic_buffering_minus1sps->max_sub_layers_minus1 - - stRPS->NumNegativePics)); + (allowed_max_delta - stRPS->NumNegativePics)); for (i = 0; i < stRPS->NumNegativePics; i++) { READ_UE_MAX (nr, stRPSEXT->delta_poc_s0_minus1i, 32767); @@ -913,6 +953,7 @@ /* 7-57 */ stRPS->NumDeltaPocs = stRPS->NumPositivePics + stRPS->NumNegativePics; + CHECK_ALLOWED_MAX (stRPS->NumDeltaPocs, allowed_max_delta); return TRUE;
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/codecparsers/gsth266parser.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/codecparsers/gsth266parser.c
Changed
@@ -6029,6 +6029,18 @@ return ret; } +// This is public API since 1.30 +static void +gst_h266_sei_clear (GstH266SEIMessage * sei) +{ + if (sei->payloadType == GST_H266_SEI_REGISTERED_USER_DATA) { + GstH266RegisteredUserData *rud = &sei->payload.registered_user_data; + g_free ((guint8 *) rud->data); + rud->data = NULL; + } + memset (sei, 0, sizeof (GstH266SEIMessage)); +} + static GstH266ParserResult gst_h266_parser_parse_sei_message (GstH266SEIMessage * sei, NalReader * nr, GstH266Parser * parser, guint8 nal_type, guint8 nal_tid) @@ -6150,21 +6162,10 @@ error: GST_WARNING ("error parsing \"Sei message\""); + gst_h266_sei_clear (sei); return GST_H266_PARSER_ERROR; } -// This is public API since 1.30 -static void -gst_h266_sei_clear (GstH266SEIMessage * sei) -{ - if (sei->payloadType == GST_H266_SEI_REGISTERED_USER_DATA) { - GstH266RegisteredUserData *rud = &sei->payload.registered_user_data; - g_free ((guint8 *) rud->data); - rud->data = NULL; - } - memset (sei, 0, sizeof (GstH266SEIMessage)); -} - /** * gst_h266_parser_parse_sei: * @parser: a #GstH266Parser
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/d3d12/gstd3d12cmdqueue.cpp -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/d3d12/gstd3d12cmdqueue.cpp
Changed
@@ -419,6 +419,9 @@ GST_INFO_OBJECT (self, "Entering GC thread"); + /* temporary storage to release GC data without priv->lock taken */ + std::vector < GCDataPtr > completed_data; + while (true) { GCDataPtr gc_data; @@ -434,7 +437,7 @@ while (!priv->gc_list.empty ()) { auto top = priv->gc_list.top (); if (top->fence_val > completed) { - gc_data = top; + gc_data = std::move (top); priv->gc_list.pop (); break; } @@ -443,10 +446,13 @@ G_GUINT64_FORMAT ", fence value %" G_GUINT64_FORMAT, completed, top->fence_val); + completed_data.push_back (std::move (top)); priv->gc_list.pop (); } } + completed_data.clear (); + if (gc_data) { GST_LOG_OBJECT (self, "Waiting for fence data %" G_GUINT64_FORMAT, gc_data->fence_val); @@ -546,13 +552,8 @@ } { - if (priv->gc_thread != g_thread_self ()) { - std::lock_guard < std::mutex > lk (priv->lock); - gc_list = priv->gc_list; - priv->gc_list = { }; - } else { - priv->gc_list = { }; - } + std::lock_guard < std::mutex > lk (priv->lock); + gc_list.swap (priv->gc_list); } }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/d3d12/gstd3d12converter-unpack.cpp -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/d3d12/gstd3d12converter-unpack.cpp
Changed
@@ -275,7 +275,7 @@ priv->tg_y = (guint) ceil (priv->in_info.height / (float) bytecode.y_unit); priv->x_unit = bytecode.x_unit; - priv->y_unit = bytecode.x_unit; + priv->y_unit = bytecode.y_unit; D3D12_COMPUTE_PIPELINE_STATE_DESC pso_desc = { }; pso_desc.pRootSignature = priv->rs_typed.Get ();
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/d3d12/gstd3d12stagingmemory.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/d3d12/gstd3d12stagingmemory.h
Changed
@@ -28,12 +28,12 @@ #define GST_D3D12_STAGING_MEMORY_CAST(obj) ((GstD3D12StagingMemory *)obj) #define GST_TYPE_D3D12_STAGING_ALLOCATOR (gst_d3d12_staging_allocator_get_type()) -#define GST_D3D12_STAGING_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_D3D12_STAGING_ALLOCATOR, GstD3D12Allocator)) -#define GST_D3D12_STAGING_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_D3D12_STAGING_ALLOCATOR, GstD3D12AllocatorClass)) +#define GST_D3D12_STAGING_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_D3D12_STAGING_ALLOCATOR, GstD3D12StagingAllocator)) +#define GST_D3D12_STAGING_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_D3D12_STAGING_ALLOCATOR, GstD3D12StagingAllocatorClass)) #define GST_IS_D3D12_STAGING_ALLOCATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_D3D12_STAGING_ALLOCATOR)) #define GST_IS_D3D12_STAGING_ALLOCATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_D3D12_STAGING_ALLOCATOR)) -#define GST_D3D12_STAGING_ALLOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_D3D12_STAGING_ALLOCATOR, GstD3D12AllocatorClass)) -#define GST_D3D12_STAGING_ALLOCATOR_CAST(obj) ((GstD3D12Allocator *)obj) +#define GST_D3D12_STAGING_ALLOCATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_D3D12_STAGING_ALLOCATOR, GstD3D12StagingAllocatorClass)) +#define GST_D3D12_STAGING_ALLOCATOR_CAST(obj) ((GstD3D12StagingAllocator *)obj) /** * GST_D3D12_STAGING_MEMORY_NAME: @@ -104,7 +104,7 @@ /** * GstD3D12StagingAllocatorClass: * - * Opaque GstD3D12AllocatorClass struct + * Opaque GstD3D12StagingAllocatorClass struct * * Since: 1.28 */
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/hip/gsthipstream.cpp -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/hip/gsthipstream.cpp
Changed
@@ -144,7 +144,7 @@ { g_return_val_if_fail (stream, G_MAXUINT); - return stream->vendor; + return stream->device_id; } /**
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/hip/meson.build -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/hip/meson.build
Changed
@@ -74,7 +74,8 @@ hipstub_incdir = include_directories('./stub') pkg_name = 'gstreamer-hip-' + api_version -gsthip = library('gsthip', hip_sources, +gsthip = library('gsthip-' + api_version, + hip_sources, c_args : gst_plugins_bad_args + extra_args, cpp_args: gst_plugins_bad_args + extra_args, include_directories : configinc, libsinc, hipstub_incdir,
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/opencv/meson.build -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/opencv/meson.build
Changed
@@ -32,9 +32,12 @@ gstopencv_cargs = opencv_dep = dependency('opencv', version : '>= 3.0.0', '< 3.5.0', required : false, include_type: 'system' ) if not opencv_dep.found() - opencv_dep = dependency('opencv4', version : '>= 4.0.0', required : opencv_opt, include_type: 'system') + opencv_dep = dependency('opencv4', version : '>= 4.0.0', required : false, include_type: 'system') if not opencv_dep.found() - subdir_done() + opencv_dep = dependency('opencv5', version : '>= 5.0.0', required : opencv_opt, include_type: 'system') + if not opencv_dep.found() + subdir_done() + endif endif endif @@ -65,7 +68,7 @@ # Use prefix from pkg-config to be compatible with cross-compilation fsmod = import('fs') opencv_path_name = '' -foreach d : 'opencv', 'OpenCV', 'opencv4' +foreach d : 'opencv', 'OpenCV', 'opencv4', 'opencv5' if fsmod.is_dir(opencv_prefix / 'share' / d) opencv_path_name = d break
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/vulkan/gstvkformat.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/vulkan/gstvkformat.c
Changed
@@ -130,6 +130,7 @@ #define SUB4224 { 0, 1, 1, 0 }, { 0, 0, 0, 0 } #define ASPECT_2PLANE (VK_IMAGE_ASPECT_PLANE_0_BIT | VK_IMAGE_ASPECT_PLANE_1_BIT) +#define ASPECT_3PLANE (VK_IMAGE_ASPECT_PLANE_0_BIT | VK_IMAGE_ASPECT_PLANE_1_BIT | VK_IMAGE_ASPECT_PLANE_2_BIT) /* *INDENT-OFF* */ static GstVulkanFormatInfo formats = { @@ -176,6 +177,7 @@ {FORMAT (R8, SINT), FLAG (RGB) | NE, DPTH8, PSTR4, PLANE0, OFFS0, SUB4, VK_IMAGE_ASPECT_COLOR_BIT}, {FORMAT (R8, SRGB), FLAG (RGB) | NE, DPTH8, PSTR4, PLANE0, OFFS0, SUB4, VK_IMAGE_ASPECT_COLOR_BIT}, {FORMAT (G8_B8R8_2PLANE_420, UNORM), FLAG (YUV), DPTH888, PSTR122, PLANE011, OFFS001, SUB420, ASPECT_2PLANE}, + {FORMAT (G8_B8_R8_3PLANE_420, UNORM), FLAG (YUV), DPTH888, PSTR111, PLANE012, OFFS0, SUB420, ASPECT_3PLANE}, {FORMAT_PACK (G10X6_B10X6R10X6_2PLANE_420, UNORM, 3PACK16), FLAG (YUV), DPTH10_10_10_HI, PSTR244, PLANE011, OFFS001, SUB420, ASPECT_2PLANE}, #if 0 FIXME: implement:
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/vulkan/gstvktrash.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/vulkan/gstvktrash.c
Changed
@@ -115,6 +115,23 @@ trash->user_data = user_data; } +static void +gst_vulkan_trash_reinit (GstVulkanTrash * trash, GstVulkanFence * fence, + GstVulkanTrashNotify notify, gpointer user_data) +{ + g_return_if_fail (fence != NULL); + g_return_if_fail (GST_IS_VULKAN_DEVICE (fence->device)); + g_return_if_fail (notify != NULL); + g_assert (trash->fence == NULL); + + GST_TRACE ("Reinitializing trash object %p with fence %" GST_PTR_FORMAT + " on device %" GST_PTR_FORMAT, trash, fence, fence->device); + + trash->fence = gst_vulkan_fence_ref (fence); + trash->notify = notify; + trash->user_data = user_data; +} + /** * gst_vulkan_trash_new: * @fence: a #GstVulkanFence @@ -328,7 +345,14 @@ static gpointer gst_vulkan_trash_list_alloc_impl (GstVulkanHandlePool * pool, GError ** error) { - return g_new0 (GstVulkanTrash, 1); + GstVulkanTrash *trash = g_new0 (GstVulkanTrash, 1); + + gst_mini_object_init ((GstMiniObject *) trash, 0, + gst_vulkan_trash_get_type (), NULL, + (GstMiniObjectDisposeFunction) gst_vulkan_trash_dispose, + (GstMiniObjectFreeFunction) gst_vulkan_trash_free); + + return trash; } static void @@ -393,7 +417,7 @@ pool_class = GST_VULKAN_HANDLE_POOL_GET_CLASS (trash_list); trash = pool_class->acquire (pool, NULL); - gst_vulkan_trash_init (trash, fence, notify, user_data); + gst_vulkan_trash_reinit (trash, fence, notify, user_data); trash->cache = gst_object_ref (trash_list); GST_TRACE_OBJECT (trash_list, "acquired trash object %p", trash);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-libs/gst/wayland/gstwlvideobufferpool.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-libs/gst/wayland/gstwlvideobufferpool.c
Changed
@@ -213,6 +213,7 @@ buffer_too_small: { GST_ERROR_OBJECT (self, "dumb buffer too small to store an image."); + gst_memory_unref (dma_mem); return GST_FLOW_ERROR; } }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst-plugins-bad.doap -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst-plugins-bad.doap
Changed
@@ -35,6 +35,26 @@ <release> <Version> + <revision>1.28.7</revision> + <branch>1.28</branch> + <name></name> + <created>2026-09-07</created> + <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.28.7.tar.xz" /> + </Version> + </release> + + <release> + <Version> + <revision>1.28.6</revision> + <branch>1.28</branch> + <name></name> + <created>2026-08-05</created> + <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.28.6.tar.xz" /> + </Version> + </release> + + <release> + <Version> <revision>1.28.5</revision> <branch>1.28</branch> <name></name>
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/adpcmdec/adpcmdec.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/adpcmdec/adpcmdec.c
Changed
@@ -108,7 +108,7 @@ return FALSE; if (!gst_structure_get_int (structure, "block_align", &dec->blocksize)) - dec->blocksize = -1; /* Not provided */ + return FALSE; if (!gst_structure_get_int (structure, "rate", &dec->rate)) return FALSE; @@ -280,7 +280,7 @@ int i, j; int sample; - if ((n_samples - dec->channels) % 8 != 0) { + if ((n_samples - dec->channels) % (8 * dec->channels) != 0) { GST_WARNING_OBJECT (dec, "Input not correct size"); return FALSE; }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/closedcaption/gsth265reorder.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/closedcaption/gsth265reorder.c
Changed
@@ -605,6 +605,18 @@ GST_LOG_OBJECT (self, "Parsed nal type: %d, offset %d, size %d", nalu->type, nalu->offset, nalu->size); + if (nalu->layer_id != 0) { + /* 7.4.2.1 + * decoders conforming to a profile specified in Annex A and not + * supporting the independent non-base layer decoding (INBLD) capability + * specified in Annex F shall ignore (i.e., remove from the bitstream + * and discard) all NAL units with values of nuh_layer_id not equal to 0 + */ + GST_LOG_OBJECT (self, "Skip nalu type %d with layer id %d", + nalu->type, nalu->layer_id); + return GST_H265_PARSER_OK; + } + memset (&decoder_nalu, 0, sizeof (GstH265ReorderNalUnit)); decoder_nalu.nalu_type = nalu->type; @@ -735,6 +747,18 @@ for (j = 0; j < array->nalu->len; j++) { GstH265NalUnit *nalu = &g_array_index (array->nalu, GstH265NalUnit, j); + if (nalu->layer_id != 0) { + /* 7.4.2.1 + * decoders conforming to a profile specified in Annex A and not + * supporting the independent non-base layer decoding (INBLD) capability + * specified in Annex F shall ignore (i.e., remove from the bitstream + * and discard) all NAL units with values of nuh_layer_id not equal to 0 + */ + GST_DEBUG_OBJECT (self, "Skip nalu type %d with layer id %d", + nalu->type, nalu->layer_id); + continue; + } + switch (nalu->type) { case GST_H265_NAL_VPS: pres = gst_h265_parser_parse_vps (parser, nalu, &vps);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/debugutils/gsttestsrcbin.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/debugutils/gsttestsrcbin.c
Changed
@@ -99,7 +99,7 @@ typedef struct _GstTestSrcBinClass GstTestSrcBinClass; /* *INDENT-OFF* */ -GType gst_test_src_bin_get_type (void) G_GNUC_CONST; +GType gst_test_src_bin_get_type (void); /* *INDENT-ON* */ struct _GstTestSrcBinClass
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/dvdspu/gstspu-vobsub.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/dvdspu/gstspu-vobsub.c
Changed
@@ -146,7 +146,7 @@ data += 1; break; case SPU_CMD_SET_COLOR:{ - if (G_UNLIKELY (data + 3 >= end)) + if (G_UNLIKELY (data + 3 > end)) return; /* Invalid SET_COLOR cmd at the end of the blk */ state->vobsub.main_idx3 = data1 >> 4; @@ -164,7 +164,7 @@ break; } case SPU_CMD_SET_ALPHA:{ - if (G_UNLIKELY (data + 3 >= end)) + if (G_UNLIKELY (data + 3 > end)) return; /* Invalid SET_ALPHA cmd at the end of the blk */ state->vobsub.main_alpha3 = data1 >> 4; @@ -184,7 +184,7 @@ case SPU_CMD_SET_DAREA:{ SpuRect *r = &state->vobsub.disp_rect; - if (G_UNLIKELY (data + 7 >= end)) + if (G_UNLIKELY (data + 7 > end)) return; /* Invalid SET_DAREA cmd at the end of the blk */ r->top = ((data4 & 0xff) << 4) | ((data5 & 0xf0) >> 4); @@ -200,7 +200,7 @@ break; } case SPU_CMD_DSPXA:{ - if (G_UNLIKELY (data + 5 >= end)) + if (G_UNLIKELY (data + 5 > end)) return; /* Invalid SET_DSPXE cmd at the end of the blk */ state->vobsub.pix_data0 = GST_READ_UINT16_BE (data + 1); @@ -219,13 +219,13 @@ guint16 field_size; GST_DEBUG_OBJECT (dvdspu, " Set Color & Contrast Change"); - if (G_UNLIKELY (data + 3 >= end)) + if (G_UNLIKELY (data + 3 > end)) return; /* Invalid CHG_COLCON cmd at the end of the blk */ data++; field_size = GST_READ_UINT16_BE (data); - if (G_UNLIKELY (data + field_size >= end)) + if (G_UNLIKELY (data + field_size > end)) return; /* Invalid CHG_COLCON cmd at the end of the blk */ gst_dvd_spu_parse_chg_colcon (dvdspu, data + 2, data + field_size); @@ -261,7 +261,7 @@ guint16 delay; guint8 *cmd_blk = start + cmd_blk_offset; - if (G_UNLIKELY (cmd_blk + 5 >= end)) { + if (G_UNLIKELY (cmd_blk + 4 > end)) { GST_DEBUG_OBJECT (dvdspu, "No valid command block"); return FALSE; /* No valid command block to read */ } @@ -290,6 +290,9 @@ g_return_if_fail (start != NULL); /* First command */ + if (start + 4 > end) + return; + next_blk = GST_READ_UINT16_BE (start + 2); cmd_blk_offset = 0; @@ -303,7 +306,7 @@ cmd_blk_offset = next_blk; - if (G_UNLIKELY (start + cmd_blk_offset + 5 >= end)) + if (G_UNLIKELY (start + cmd_blk_offset + 4 > end)) break; /* No valid command to read */ data = start + cmd_blk_offset; @@ -385,7 +388,7 @@ cmd_blk = start + state->vobsub.cur_cmd_blk; - if (G_UNLIKELY (cmd_blk + 5 >= end)) { + if (G_UNLIKELY (cmd_blk + 4 > end)) { gst_buffer_unmap (state->vobsub.buf, &map); /* Invalid. Finish the buffer and loop again */ gst_dvd_spu_finish_spu_buf (dvdspu);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/jpegformat/gstjpegparse.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/jpegformat/gstjpegparse.c
Changed
@@ -456,13 +456,8 @@ gst_byte_reader_init (&reader, seg->data + seg->offset, seg->size); gst_byte_reader_skip_unchecked (&reader, 2); -#if G_BYTE_ORDER == G_LITTLE_ENDIAN if (!gst_byte_reader_get_uint32_le (&reader, &id)) return FALSE; -#else - if (!gst_byte_reader_get_uint32_be (&reader, &id)) - return FALSE; -#endif if (!valid_state (parse->state, GST_JPEG_PARSER_STATE_GOT_JFIF) && GST_MAKE_FOURCC ('J', 'F', 'I', 'F') == id) { @@ -480,19 +475,11 @@ return FALSE; /* x density */ -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - if (!gst_byte_reader_get_uint16_le (&reader, &xd)) - return FALSE; - /* y density */ - if (!gst_byte_reader_get_uint16_le (&reader, &yd)) - return FALSE; -#else if (!gst_byte_reader_get_uint16_be (&reader, &xd)) return FALSE; /* y density */ if (!gst_byte_reader_get_uint16_be (&reader, &yd)) return FALSE; -#endif /* x thumbnail */ if (!gst_byte_reader_get_uint8 (&reader, &xt))
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/mpegdemux/gstmpegdemux.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/mpegdemux/gstmpegdemux.c
Changed
@@ -1055,6 +1055,7 @@ stream->gap_ref_pts = time; if (stream->last_ts != GST_CLOCK_TIME_NONE && stream->last_ts > time) stream->gap_ref_pts = stream->last_ts; + stream->gap_ref_buffers = stream->nb_out_buffers; } } } @@ -1720,6 +1721,7 @@ static GstFlowReturn gst_ps_demux_parse_pack_start (GstPsDemux * demux) { + GstByteReader br; const guint8 *data; guint length; guint32 scr1, scr2; @@ -1727,6 +1729,7 @@ guint64 scr_rate_n; guint64 scr_rate_d; guint avail = gst_adapter_available (demux->adapter); + guint8 b; GST_LOG ("parsing pack start"); @@ -1734,18 +1737,19 @@ goto need_more_data; data = gst_adapter_map (demux->adapter, PACK_START_SIZE); + gst_byte_reader_init (&br, data, PACK_START_SIZE); /* skip start code */ - data += 4; + gst_byte_reader_skip_unchecked (&br, 4); - scr1 = GST_READ_UINT32_BE (data); - scr2 = GST_READ_UINT32_BE (data + 4); + scr1 = gst_byte_reader_get_uint32_be_unchecked (&br); /* fixed length to begin with, start code and two scr values */ - length = 8 + 4; + length = 4 + 8; /* start parsing the stream */ - if ((*data & 0xc0) == 0x40) { + /* MPEG2: first 2 bits of scr1 are '01' */ + if ((scr1 & 0xc0000000) == 0x40000000) { guint32 scr_ext; guint32 next32; guint8 stuffing_bytes; @@ -1756,6 +1760,10 @@ /* mpeg2 has more data */ length += 2; + /* Peek scr2 at bytes 8-11 without advancing (next32 overlaps at bytes 10-13) */ + if (!gst_byte_reader_peek_uint32_be (&br, &scr2)) + goto fail_invalid; + /* :2=01 ! scr:3 ! marker:1==1 ! scr:15 ! marker:1==1 ! scr:15 */ /* check markers */ @@ -1765,9 +1773,8 @@ scr = ((guint64) scr1 & 0x38000000) << 3; scr |= ((guint64) scr1 & 0x03fff800) << 4; scr |= ((guint64) scr1 & 0x000003ff) << 5; - scr |= ((guint64) scr2 & 0xf8000000) >> 27; - /* marker:1==1 ! scr_ext:9 ! marker:1==1 */ + scr |= ((guint64) scr2 & 0xf8000000) >> 27; if (G_UNLIKELY ((scr2 & 0x04010000) != 0x04010000)) goto lost_sync; @@ -1783,9 +1790,14 @@ } /* SCR has been converted into units of 90Khz ticks to make it comparable to DTS/PTS, that also implies 1 tick rounding error */ - data += 6; + + /* Skip to byte 10 (scr2 peeks at bytes 8-11, next32 overlaps at bytes 10-13) */ + if (!gst_byte_reader_skip (&br, 2)) + goto fail_invalid; + /* PMR:22 ! :2==11 ! reserved:5 ! stuffing_len:3 */ - next32 = GST_READ_UINT32_BE (data); + if (!gst_byte_reader_get_uint32_be (&br, &next32)) + goto fail_invalid; if (G_UNLIKELY ((next32 & 0x00000300) != 0x00000300)) goto lost_sync; @@ -1794,13 +1806,18 @@ stuffing_bytes = (next32 & 0x07); GST_LOG_OBJECT (demux, "stuffing bytes: %d", stuffing_bytes); - data += 4; length += stuffing_bytes; while (stuffing_bytes--) { - if (*data++ != 0xff) + if (!gst_byte_reader_get_uint8 (&br, &b)) + goto fail_invalid; + if (b != 0xff) goto lost_sync; } } else { + /* MPEG-1 pack header */ + if (!gst_byte_reader_get_uint32_be (&br, &scr2)) + goto fail_invalid; + GST_DEBUG ("Found MPEG1 stream"); demux->is_mpeg2_pack = FALSE; @@ -1822,8 +1839,6 @@ /* marker:1==1 ! mux_rate:22 ! marker:1==1 */ new_rate = (scr2 & 0x007ffffe) >> 1; - - data += 8; } if (demux->ignore_scr) { @@ -1966,6 +1981,13 @@ return GST_FLOW_OK; +fail_invalid: + GST_DEBUG_OBJECT (demux, "Failed to parse pack start. Skipping"); + gst_adapter_unmap (demux->adapter); + gst_adapter_flush (demux->adapter, length); + ADAPTER_OFFSET_FLUSH (length); + return GST_FLOW_LOST_SYNC; + lost_sync: { GST_DEBUG_OBJECT (demux, "lost sync"); @@ -2009,11 +2031,14 @@ gst_ps_demux_parse_sys_head (GstPsDemux * demux) { guint16 length; + guint8 byte_val; + GstByteReader br; const guint8 *data; #ifndef GST_DISABLE_GST_DEBUG gboolean csps; #endif + /* Need at least 6 bytes for start code + length */ if (gst_adapter_available (demux->adapter) < 6) goto need_more_data; @@ -2026,6 +2051,10 @@ length = GST_READ_UINT16_BE (data); GST_DEBUG_OBJECT (demux, "length %d", length); + /* Minimum header_length is 6 (96 bits of fixed header after start code + length) */ + if (G_UNLIKELY (length < 6)) + goto sys_len_error; + length += 6; gst_adapter_unmap (demux->adapter); @@ -2034,27 +2063,34 @@ data = gst_adapter_map (demux->adapter, length); + gst_byte_reader_init (&br, data, length); + /* skip start code and length */ - data += 6; + if (!gst_byte_reader_skip (&br, 6)) + goto fail_invalid; /* marker:1==1 ! rate_bound:22 | marker:1==1 */ - if ((*data & 0x80) != 0x80) + if (!gst_byte_reader_get_uint8 (&br, &byte_val)) + goto fail_invalid; + if ((byte_val & 0x80) != 0x80) goto marker_expected; { guint32 rate_bound; + guint8 b1, b2; - if ((data2 & 0x01) != 0x01) + if (!gst_byte_reader_get_uint8 (&br, &b1) || + !gst_byte_reader_get_uint8 (&br, &b2)) + goto fail_invalid; + if ((b2 & 0x01) != 0x01) goto marker_expected; - rate_bound = ((guint32) data0 & 0x7f) << 15; - rate_bound |= ((guint32) data1) << 7; - rate_bound |= ((guint32) data2 & 0xfe) >> 1; + rate_bound = ((guint32) byte_val & 0x7f) << 15; + rate_bound |= ((guint32) b1) << 7; + rate_bound |= ((guint32) b2 & 0xfe) >> 1; rate_bound *= MPEG_MUX_RATE_MULT; GST_DEBUG_OBJECT (demux, "rate bound %u", rate_bound); - - data += 3; } /* audio_bound:6==1 ! fixed:1 | constrained:1 */ @@ -2062,18 +2098,22 @@ #ifndef GST_DISABLE_GST_DEBUG guint8 audio_bound; gboolean fixed; +#endif + + if (!gst_byte_reader_get_uint8 (&br, &byte_val)) + goto fail_invalid; +#ifndef GST_DISABLE_GST_DEBUG /* max number of simultaneous audio streams active */ - audio_bound = (data0 & 0xfc) >> 2; + audio_bound = (byte_val & 0xfc) >> 2; /* fixed or variable bitrate */ - fixed = (data0 & 0x02) == 0x02; + fixed = (byte_val & 0x02) == 0x02; /* meeting constraints */ - csps = (data0 & 0x01) == 0x01; + csps = (byte_val & 0x01) == 0x01; GST_DEBUG_OBJECT (demux, "audio_bound %d, fixed %d, constrained %d", audio_bound, fixed, csps); #endif - data += 1; } /* audio_lock:1 | video_lock:1 | marker:1==1 | video_bound:5 */ @@ -2082,22 +2122,26 @@ gboolean audio_lock; gboolean video_lock; guint8 video_bound; +#endif - audio_lock = (data0 & 0x80) == 0x80; - video_lock = (data0 & 0x40) == 0x40; + if (!gst_byte_reader_get_uint8 (&br, &byte_val)) + goto fail_invalid; + +#ifndef GST_DISABLE_GST_DEBUG + audio_lock = (byte_val & 0x80) == 0x80; + video_lock = (byte_val & 0x40) == 0x40; #endif - if ((data0 & 0x20) != 0x20) + if ((byte_val & 0x20) != 0x20) goto marker_expected; #ifndef GST_DISABLE_GST_DEBUG /* max number of simultaneous video streams active */ - video_bound = (data0 & 0x1f); + video_bound = (byte_val & 0x1f); GST_DEBUG_OBJECT (demux, "audio_lock %d, video_lock %d, video_bound %d", audio_lock, video_lock, video_bound); #endif - data += 1; } /* packet_rate_restriction:1 | reserved:7==0x7F */ @@ -2105,56 +2149,74 @@ #ifndef GST_DISABLE_GST_DEBUG gboolean packet_rate_restriction; #endif - if ((data0 & 0x7f) != 0x7f) + + if (!gst_byte_reader_get_uint8 (&br, &byte_val)) + goto fail_invalid; + + if ((byte_val & 0x7f) != 0x7f) goto marker_expected; #ifndef GST_DISABLE_GST_DEBUG /* only valid if csps is set */ if (csps) { - packet_rate_restriction = (data0 & 0x80) == 0x80; + packet_rate_restriction = (byte_val & 0x80) == 0x80; GST_DEBUG_OBJECT (demux, "packet_rate_restriction %d", packet_rate_restriction); } #endif } - data += 1; { - gint stream_count = (length - 12) / 3; - gint i; + guint stream_entries_length; + GstByteReader stream_br; + + stream_entries_length = gst_byte_reader_get_remaining (&br); + GST_DEBUG_OBJECT (demux, "stream entries: number of entries %u, %u bytes", + (length - 12) / 3, stream_entries_length); - GST_DEBUG_OBJECT (demux, "number of streams: %d ", stream_count); + if (!gst_byte_reader_get_sub_reader (&br, &stream_br, + stream_entries_length)) + goto fail_invalid; - for (i = 0; i < stream_count; i++) { + while (gst_byte_reader_get_remaining (&stream_br) >= 3) { guint8 stream_id; #ifndef GST_DISABLE_GST_DEBUG gboolean STD_buffer_bound_scale; guint16 STD_buffer_size_bound; guint32 buf_byte_size_bound; #endif - stream_id = *data++; + + if (!gst_byte_reader_get_uint8 (&stream_br, &stream_id)) + break; if (!(stream_id & 0x80)) goto sys_len_error; - /* check marker bits */ - if ((*data & 0xC0) != 0xC0) - goto no_placeholder_bits; + { + guint16 buffer_info; + + if (!gst_byte_reader_get_uint16_be (&stream_br, &buffer_info)) + break; + + /* check marker bits */ + if ((buffer_info & 0xC000) != 0xC000) + goto no_placeholder_bits; + #ifndef GST_DISABLE_GST_DEBUG - STD_buffer_bound_scale = *data & 0x20; - STD_buffer_size_bound = ((guint16) (*data++ & 0x1F)) << 8; - STD_buffer_size_bound |= *data++; + STD_buffer_bound_scale = (buffer_info & 0x2000) != 0; + STD_buffer_size_bound = buffer_info & 0x1FFF; - if (STD_buffer_bound_scale == 0) { - buf_byte_size_bound = STD_buffer_size_bound * 128; - } else { - buf_byte_size_bound = STD_buffer_size_bound * 1024; - } + if (STD_buffer_bound_scale == 0) { + buf_byte_size_bound = STD_buffer_size_bound * 128; + } else { + buf_byte_size_bound = STD_buffer_size_bound * 1024; + } - GST_DEBUG_OBJECT (demux, "STD_buffer_bound_scale %d", - STD_buffer_bound_scale); - GST_DEBUG_OBJECT (demux, "STD_buffer_size_bound %d or %d bytes", - STD_buffer_size_bound, buf_byte_size_bound); + GST_DEBUG_OBJECT (demux, "STD_buffer_bound_scale %d", + STD_buffer_bound_scale); + GST_DEBUG_OBJECT (demux, "STD_buffer_size_bound %d or %d bytes", + STD_buffer_size_bound, buf_byte_size_bound); #endif + } } } @@ -2164,6 +2226,13 @@ return GST_FLOW_OK; /* ERRORS */ +fail_invalid: + GST_DEBUG_OBJECT (demux, "Failed to parse system header. Skipping"); + gst_adapter_unmap (demux->adapter); + gst_adapter_flush (demux->adapter, length); + ADAPTER_OFFSET_FLUSH (length); + return GST_FLOW_LOST_SYNC; + marker_expected: { GST_DEBUG_OBJECT (demux, "expecting marker"); @@ -2551,29 +2620,66 @@ gst_ps_demux_scan_ts (GstPsDemux * demux, const guint8 * data, SCAN_MODE mode, guint64 * rts, const guint8 * end) { + GstByteReader br; gboolean ret = FALSE; guint32 scr1, scr2; guint64 scr; guint64 pts, dts; + guint8 b; + guint16 len; + guint32 code; + + /* Local macro to read a 5-byte PTS/DTS using a GstByteReader */ +#define READ_TS_BR(br, target) \ + G_STMT_START { \ + guint8 _ts_b0, _ts_b1, _ts_b2, _ts_b3, _ts_b4; \ + if (!gst_byte_reader_get_uint8 (&br, &_ts_b0)) \ + goto beach; \ + if ((_ts_b0 & 0x01) != 0x01) \ + goto beach; \ + (target) = ((guint64) (_ts_b0 & 0x0e)) << 29; \ + if (!gst_byte_reader_get_uint8 (&br, &_ts_b1)) \ + goto beach; \ + (target) |= ((guint64) _ts_b1) << 22; \ + if (!gst_byte_reader_get_uint8 (&br, &_ts_b2)) \ + goto beach; \ + if ((_ts_b2 & 0x01) != 0x01) \ + goto beach; \ + (target) |= ((guint64) (_ts_b2 & 0xfe)) << 14; \ + if (!gst_byte_reader_get_uint8 (&br, &_ts_b3)) \ + goto beach; \ + (target) |= ((guint64) _ts_b3) << 7; \ + if (!gst_byte_reader_get_uint8 (&br, &_ts_b4)) \ + goto beach; \ + if ((_ts_b4 & 0x01) != 0x01) \ + goto beach; \ + (target) |= ((guint64) (_ts_b4 & 0xfe)) >> 1; \ + } G_STMT_END; + + gst_byte_reader_init (&br, data, end - data); /* read the 4 bytes for the sync code */ - if (end - data < 4) + if (!gst_byte_reader_get_uint32_be (&br, &code)) goto beach; - if (G_LIKELY (GST_READ_UINT32_BE (data) != ID_PS_PACK_START_CODE)) + if (G_LIKELY (code != ID_PS_PACK_START_CODE)) goto beach; - data += 4; - if (end - data < 8) + /* read SCR values: scr1 consumed, scr2 needs special handling depending on + * MPEG version below */ + if (!gst_byte_reader_get_uint32_be (&br, &scr1)) goto beach; - /* skip start code */ - scr1 = GST_READ_UINT32_BE (data); - scr2 = GST_READ_UINT32_BE (data + 4); - /* start parsing the stream */ - if ((*data & 0xc0) == 0x40) { + + /* MPEG-2: first 2 bits of scr1 are '01' */ + if ((scr1 & 0xc0000000) == 0x40000000) { /* MPEG-2 PACK header */ guint32 scr_ext; guint32 next32; guint8 stuffing_bytes; + + /* Peek scr2 at bytes 8-11 without advancing (next32 overlaps at bytes 10-13) */ + if (!gst_byte_reader_peek_uint32_be (&br, &scr2)) + goto beach; + /* :2=01 ! scr:3 ! marker:1==1 ! scr:15 ! marker:1==1 ! scr:15 */ /* check markers */ if ((scr1 & 0xc4000400) != 0x44000400) @@ -2581,8 +2687,8 @@ scr = ((guint64) scr1 & 0x38000000) << 3; scr |= ((guint64) scr1 & 0x03fff800) << 4; scr |= ((guint64) scr1 & 0x000003ff) << 5; - scr |= ((guint64) scr2 & 0xf8000000) >> 27; /* marker:1==1 ! scr_ext:9 ! marker:1==1 */ + scr |= ((guint64) scr2 & 0xf8000000) >> 27; if ((scr2 & 0x04010000) != 0x04010000) goto beach; scr_ext = (scr2 & 0x03fe0000) >> 17; @@ -2591,24 +2697,26 @@ } /* SCR has been converted into units of 90Khz ticks to make it comparable to DTS/PTS, that also implies 1 tick rounding error */ - data += 6; - if (end - data < 4) + /* Skip to byte 10 (scr2 peeks at bytes 8-11, next32 overlaps at bytes 10-13) */ + if (!gst_byte_reader_skip (&br, 2)) goto beach; + /* PMR:22 ! :2==11 ! reserved:5 ! stuffing_len:3 */ - next32 = GST_READ_UINT32_BE (data); + if (!gst_byte_reader_get_uint32_be (&br, &next32)) + goto beach; if ((next32 & 0x00000300) != 0x00000300) goto beach; stuffing_bytes = (next32 & 0x07); - data += 4; - if (end - data < stuffing_bytes) - goto beach; while (stuffing_bytes--) { - if (*data++ != 0xff) + if (!gst_byte_reader_get_uint8 (&br, &b) || b != 0xff) goto beach; } } else { /* MPEG-1 pack header */ + if (!gst_byte_reader_get_uint32_be (&br, &scr2)) + goto beach; + /* check markers */ if ((scr1 & 0xf1000100) != 0x21000100) goto beach; @@ -2619,7 +2727,6 @@ scr |= ((guint64) scr1 & 0x00fffe00) << 6; scr |= ((guint64) scr1 & 0x000000ff) << 7; scr |= ((guint64) scr2 & 0xfe000000) >> 25; - data += 8; } if (mode == SCAN_SCR) { @@ -2629,25 +2736,32 @@ } /* Possible optional System header here */ - if (end - data < 6) + /* Peek at the next 4 bytes to check for system header start code */ + if (!gst_byte_reader_peek_uint32_be (&br, &code)) goto beach; - - guint32 code = GST_READ_UINT32_BE (data); - guint len = GST_READ_UINT16_BE (data + 4); if (code == ID_PS_SYSTEM_HEADER_START_CODE) { /* Found a system header, skip it */ - /* Check for sufficient data - system header, plus enough - * left over for the PES packet header */ - if (end - data < 6 + len + 6) + if (!gst_byte_reader_skip (&br, 4)) + goto beach; + if (!gst_byte_reader_get_uint16_be (&br, &len)) + goto beach; + if (!gst_byte_reader_skip (&br, len)) goto beach; - data += len + 6; /* read the 4 bytes for the PES sync code */ - code = GST_READ_UINT32_BE (data); - len = GST_READ_UINT16_BE (data + 4); + if (!gst_byte_reader_get_uint32_be (&br, &code)) + goto beach; + if (!gst_byte_reader_get_uint16_be (&br, &len)) + goto beach; + } else { + /* Not a system header, retrieve length of PES packet */ + if (!gst_byte_reader_skip (&br, 4)) + goto beach; + if (!gst_byte_reader_get_uint16_be (&br, &len)) + goto beach; } /* Check we have enough data left for reading the PES packet */ - if (end - data < 6 + len) + if (gst_byte_reader_get_remaining (&br) < len) goto beach; if (!gst_ps_demux_is_pes_sync (code)) goto beach; @@ -2665,87 +2779,89 @@ break; } - /* skip sync code and size */ - data += 6; - /* update end to the actual size of the PES packet */ - end = data + len; - - pts = dts = -1; - /* stuffing bits, first two bits are '10' for mpeg2 pes so this code is - * not triggered. */ - while (data < end) { - if (*data != 0xff) - break; - data++; - } - if (data == end) - goto beach; + /* PES sync code and size already consumed above; pes_br below is bounded + * by len, which is the PES packet body that follows the 6-byte header. */ - /* STD buffer size, never for mpeg2 */ - if ((*data & 0xc0) == 0x40) { - if (end - data < 2) - goto beach; - data += 2; - } + { + GstByteReader pes_br; - /* PTS but no DTS, never for mpeg2 */ - if (data == end) - goto beach; - if ((*data & 0xf0) == 0x20) { - if (end - data < 5) + if (!gst_byte_reader_get_sub_reader (&br, &pes_br, len)) goto beach; - READ_TS (data, pts, beach); - data += 5; - } - /* PTS and DTS, never for mpeg2 */ - else if ((*data & 0xf0) == 0x30) { - if (end - data < 10) - goto beach; - READ_TS (data, pts, beach); - READ_TS (data, dts, beach); - data += 10; - } else if ((*data & 0xc0) == 0x80) { - guint8 flags; - if (end - data < 3) - goto beach; - /* mpeg2 case */ - /* 2: '10' - * 2: PES_scrambling_control - * 1: PES_priority - * 1: data_alignment_indicator - * 1: copyright - * 1: original_or_copy - */ - data++; - - /* 2: PTS_DTS_flags - * 1: ESCR_flag - * 1: ES_rate_flag - * 1: DSM_trick_mode_flag - * 1: additional_copy_info_flag - * 1: PES_CRC_flag - * 1: PES_extension_flag - */ - flags = *data++; - /* only DTS: this is invalid */ - if ((flags & 0xc0) == 0x40) - goto beach; + pts = dts = -1; + /* stuffing bits, first two bits are '10' for mpeg2 pes so this code is + * not triggered. */ + while (gst_byte_reader_get_remaining (&pes_br) > 0) { + if (!gst_byte_reader_peek_uint8 (&pes_br, &b)) + goto beach; + if (b != 0xff) + break; + if (!gst_byte_reader_skip (&pes_br, 1)) + goto beach; + } - /* 8: PES_header_data_length */ - data++; + /* STD buffer size, never for mpeg2 */ + if (!gst_byte_reader_peek_uint8 (&pes_br, &b)) + goto beach; + if ((b & 0xc0) == 0x40) { + if (!gst_byte_reader_skip (&pes_br, 2)) + goto beach; + } - /* check for PTS */ - if ((flags & 0x80)) { - if (end - data < 5) + if (!gst_byte_reader_peek_uint8 (&pes_br, &b)) + goto beach; + /* PTS but no DTS, never for mpeg2 */ + if ((b & 0xf0) == 0x20) { + if (!gst_byte_reader_skip (&pes_br, 1)) goto beach; - READ_TS (data, pts, beach); + READ_TS_BR (pes_br, pts); } - /* check for DTS */ - if ((flags & 0x40)) { - if (end - data < 5) + /* PTS and DTS, never for mpeg2 */ + else if ((b & 0xf0) == 0x30) { + if (!gst_byte_reader_skip (&pes_br, 1)) + goto beach; + READ_TS_BR (pes_br, pts); + READ_TS_BR (pes_br, dts); + } else if ((b & 0xc0) == 0x80) { + guint8 flags; + + /* mpeg2 case */ + /* 2: '10' + * 2: PES_scrambling_control + * 1: PES_priority + * 1: data_alignment_indicator + * 1: copyright + * 1: original_or_copy + */ + if (!gst_byte_reader_skip (&pes_br, 1)) + goto beach; + + /* 2: PTS_DTS_flags + * 1: ESCR_flag + * 1: ES_rate_flag + * 1: DSM_trick_mode_flag + * 1: additional_copy_info_flag + * 1: PES_CRC_flag + * 1: PES_extension_flag + */ + if (!gst_byte_reader_get_uint8 (&pes_br, &flags)) goto beach; - READ_TS (data, dts, beach); + /* only DTS: this is invalid */ + if ((flags & 0xc0) == 0x40) + goto beach; + + /* 8: PES_header_data_length */ + if (!gst_byte_reader_skip (&pes_br, 1)) + goto beach; + + /* check for PTS */ + if (flags & 0x80) { + READ_TS_BR (pes_br, pts); + } + /* check for DTS */ + if (flags & 0x40) { + READ_TS_BR (pes_br, dts); + } } } @@ -2758,6 +2874,8 @@ *rts = pts; ret = TRUE; } +#undef READ_TS_BR + beach: return ret; }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/mpegtsdemux/tsdemux.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/mpegtsdemux/tsdemux.c
Changed
@@ -1454,7 +1454,8 @@ if (desc) { GST_LOG_OBJECT (demux, "ac4 audio"); is_audio = TRUE; - caps = gst_caps_new_empty_simple ("audio/x-ac4"); + caps = gst_caps_new_simple ("audio/x-ac4", + "stream-format", G_TYPE_STRING, "syncframe", NULL); break; } @@ -1709,7 +1710,8 @@ break; case DRF_ID_AC4: is_audio = TRUE; - caps = gst_caps_new_empty_simple ("audio/x-ac4"); + caps = gst_caps_new_simple ("audio/x-ac4", + "stream-format", G_TYPE_STRING, "syncframe", NULL); break; case DRF_ID_VP09: is_video = TRUE; @@ -3918,7 +3920,11 @@ if (((stream->continuity_counter + 1) % 16) != cc) { if (stream->state != PENDING_PACKET_EMPTY) { #ifndef GST_DISABLE_GST_DEBUG - gchar *pad_name = gst_pad_get_name (stream->pad); + gchar *pad_name = NULL; + + if (stream->pad) + pad_name = gst_pad_get_name (stream->pad); + GST_ELEMENT_WARNING_WITH_DETAILS (demux, STREAM, DEMUX, ("CONTINUITY: Mismatch packet %d, stream %d (pid 0x%04x)", cc, stream->continuity_counter, stream->stream.pid), @@ -3927,6 +3933,7 @@ G_TYPE_INT, cc, "stream", G_TYPE_INT, stream->continuity_counter, "pid", G_TYPE_UINT, stream->stream.pid, "pad-name", G_TYPE_STRING, pad_name, NULL)); + g_free (pad_name); #endif /* Clear pending state and don't process packet */
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/mxf/mxfdemux.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/mxf/mxfdemux.c
Changed
@@ -2425,13 +2425,12 @@ delta_entry->element_delta); /* Apply offset from slice/delta if needed */ - if (delta_entry->slice) + if (delta_entry->slice) { stream_offset += segment_index_entry->slice_offsetdelta_entry->slice - 1; - stream_offset += delta_entry->element_delta; - if (delta_entry->pos_table_index == -1) { - entry->keyframe = (segment_index_entry->flags & 0x80) == 0x80; } + stream_offset += delta_entry->element_delta; + entry->keyframe = (segment_index_entry->flags & 0x80) == 0x80; /* FIXME : Handle fractional offset position (delta_entry->pos_table_offset > 0) */ }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/pcapparse/gstirtspparse.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/pcapparse/gstirtspparse.c
Changed
@@ -127,7 +127,6 @@ static void gst_irtsp_parse_init (GstIRTSPParse * IRTSPParse) { - gst_base_parse_set_min_frame_size (GST_BASE_PARSE (IRTSPParse), 1); gst_irtsp_parse_reset (IRTSPParse); } @@ -144,6 +143,7 @@ GST_DEBUG_OBJECT (parse, "starting"); + gst_base_parse_set_min_frame_size (GST_BASE_PARSE (IRTSPParse), 1); gst_irtsp_parse_reset (IRTSPParse); return TRUE;
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/pnm/gstpnmdec.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/pnm/gstpnmdec.c
Changed
@@ -170,7 +170,7 @@ GST_DEBUG ("Received caps from peer: %" GST_PTR_FORMAT, peercaps); if (gst_caps_is_empty (peercaps)) { gst_caps_unref (peercaps); - return FALSE; + return GST_FLOW_NOT_NEGOTIATED; } if (!gst_caps_is_fixed (peercaps)) @@ -215,6 +215,9 @@ output_state = gst_video_decoder_set_output_state (decoder, fmt, pnmdec->mngr.info.width, pnmdec->mngr.info.height, pnmdec->input_state); + if (!output_state) + return GST_FLOW_NOT_NEGOTIATED; + gst_video_codec_state_unref (output_state); if (!gst_video_decoder_negotiate (decoder)) @@ -385,7 +388,7 @@ guint i_rowstride; guint o_rowstride; GstFlowReturn r = GST_FLOW_OK; - gint bytes, i, total_bytes = 0; + gint i, total_bytes = 0; r = gst_video_decoder_allocate_output_frame (decoder, frame); if (r != GST_FLOW_OK) { @@ -406,8 +409,13 @@ GST_BUFFER_COPY_METADATA, 0, 0); if (s->mngr.info.type == GST_PNM_TYPE_BITMAP) { - bytes = (s->mngr.info.width * s->mngr.info.height + 7) / 8; - for (i = 0; i < bytes; i++) { + guint pixels = s->mngr.info.width * s->mngr.info.height; + guint full_bytes = pixels / 8; + guint remainder = pixels % 8; + guint8 mask; + + /* Process all complete bytes (8 pixels each) */ + for (i = 0; i < full_bytes; i++) { omap.datai * 8 = (imap.datai & 0x80) ? 0 : 255; omap.datai * 8 + 1 = (imap.datai & 0x40) ? 0 : 255; omap.datai * 8 + 2 = (imap.datai & 0x20) ? 0 : 255; @@ -417,7 +425,19 @@ omap.datai * 8 + 6 = (imap.datai & 0x02) ? 0 : 255; omap.datai * 8 + 7 = (imap.datai & 0x01) ? 0 : 255; } - total_bytes = bytes * 8; + + /* Process remainder pixels from the last byte */ + if (remainder > 0) { + guint8 b = imap.datafull_bytes; + guint8 *dst = omap.data + full_bytes * 8; + mask = 0x80; + for (i = 0; i < remainder; i++) { + dsti = (b & mask) ? 0 : 255; + mask >>= 1; + } + } + + total_bytes = pixels; } else /* Need to convert from PNM rowstride to GStreamer rowstride */ if (s->mngr.info.width % 4 != 0) { @@ -529,6 +549,9 @@ r = GST_FLOW_OK; goto out; case GST_PNM_INFO_MNGR_RESULT_FINISHED: + offset = s->mngr.data_offset; + if (size < offset) + goto need_more_data; r = gst_pnmdec_negotiate (decoder); if (r != GST_FLOW_OK) @@ -541,7 +564,6 @@ GST_DEBUG_OBJECT (s, "Allocating output frame of size %u", s->size); s->buf = gst_buffer_new_and_alloc (s->size); } - offset = s->mngr.data_offset; gst_adapter_flush (adapter, offset); size = size - offset; }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/pnm/gstpnmdec.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/pnm/gstpnmdec.h
Changed
@@ -53,7 +53,7 @@ GstVideoDecoderClass parent_class ; }; -GType gst_pnmdec_get_type (void) G_GNUC_CONST; +GType gst_pnmdec_get_type (void); GST_ELEMENT_REGISTER_DECLARE (pnmdec); G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/pnm/gstpnmenc.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/pnm/gstpnmenc.h
Changed
@@ -50,7 +50,7 @@ GstVideoEncoderClass parent; }; -GType gst_pnmenc_get_type (void) G_GNUC_CONST; +GType gst_pnmenc_get_type (void); GST_ELEMENT_REGISTER_DECLARE (pnmenc); G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/pnm/gstpnmutils.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/pnm/gstpnmutils.c
Changed
@@ -157,6 +157,9 @@ mngr->state = GST_PNM_INFO_MNGR_STATE_WHITE_SPACE; mngr->data_offset += i; if (mngr->info.type == GST_PNM_TYPE_BITMAP) { + /* Reject zero-sized images */ + if (mngr->info.width == 0 || mngr->info.height == 0) + return GST_PNM_INFO_MNGR_RESULT_FAILED; mngr->data_offset += 1; mngr->info.fields |= GST_PNM_INFO_FIELDS_MAX; return GST_PNM_INFO_MNGR_RESULT_FINISHED; @@ -185,6 +188,9 @@ } else if ((mngr->info.max > 255) || (mngr->info.max < 1)) { return GST_PNM_INFO_MNGR_RESULT_FAILED; } + /* Reject zero-sized images */ + if (mngr->info.width == 0 || mngr->info.height == 0) + return GST_PNM_INFO_MNGR_RESULT_FAILED; mngr->info.fields |= GST_PNM_INFO_FIELDS_MAX; mngr->data_offset += i + 1; return GST_PNM_INFO_MNGR_RESULT_FINISHED;
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/tensordecoders/gstssdtensordec.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/tensordecoders/gstssdtensordec.c
Changed
@@ -591,8 +591,8 @@ if (self->labels && classes_map.memory && get_guint32_at_index (classes_tensor, &classes_map, i, &bclass)) { - if (bclass < self->labels->len) - label = g_array_index (self->labels, GQuark, bclass); + if (bclass > 0 && bclass - 1 < self->labels->len) + label = g_array_index (self->labels, GQuark, bclass - 1); } x_i = x * w;
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/transcode/gst-cpu-throttling-clock.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/transcode/gst-cpu-throttling-clock.h
Changed
@@ -31,7 +31,7 @@ typedef struct _GstCpuThrottlingClockClass GstCpuThrottlingClockClass; typedef struct _GstCpuThrottlingClockPrivate GstCpuThrottlingClockPrivate; -GType gst_cpu_throttling_clock_get_type (void) G_GNUC_CONST; +GType gst_cpu_throttling_clock_get_type (void); #define GST_TYPE_CPU_THROTTLING_CLOCK (gst_cpu_throttling_clock_get_type ()) #define GST_CPU_THROTTLING_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_CPU_THROTTLING_CLOCK, GstCpuThrottlingClock))
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/videoparsers/gstdiracparse.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/videoparsers/gstdiracparse.c
Changed
@@ -140,6 +140,7 @@ { gst_base_parse_set_min_frame_size (GST_BASE_PARSE (diracparse), 13); gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (diracparse), FALSE); + gst_base_parse_set_infer_ts (GST_BASE_PARSE (diracparse), FALSE); GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (diracparse)); GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (diracparse)); }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/videoparsers/gsth263parse.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/videoparsers/gsth263parse.c
Changed
@@ -98,6 +98,8 @@ static void gst_h263_parse_init (GstH263Parse * h263parse) { + gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (h263parse), FALSE); + gst_base_parse_set_infer_ts (GST_BASE_PARSE (h263parse), FALSE); GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (h263parse)); GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (h263parse)); }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/gst/videoparsers/gstvc1parse.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/gst/videoparsers/gstvc1parse.c
Changed
@@ -247,11 +247,6 @@ static void gst_vc1_parse_init (GstVC1Parse * vc1parse) { - /* Default values for stream-format=raw, i.e. - * raw VC1 frames with startcodes */ - gst_base_parse_set_syncable (GST_BASE_PARSE (vc1parse), TRUE); - gst_base_parse_set_has_timing_info (GST_BASE_PARSE (vc1parse), FALSE); - gst_vc1_parse_reset (vc1parse); GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (vc1parse)); GST_PAD_SET_ACCEPT_TEMPLATE (GST_BASE_PARSE_SINK_PAD (vc1parse)); @@ -307,6 +302,11 @@ GST_DEBUG_OBJECT (parse, "start"); gst_vc1_parse_reset (vc1parse); + /* Default values for stream-format=raw, i.e. + * raw VC1 frames with startcodes */ + gst_base_parse_set_syncable (GST_BASE_PARSE (vc1parse), TRUE); + gst_base_parse_set_has_timing_info (GST_BASE_PARSE (vc1parse), FALSE); + vc1parse->detecting_stream_format = TRUE; return TRUE;
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/meson.build -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/meson.build
Changed
@@ -1,5 +1,5 @@ project('gst-plugins-bad', 'c', 'cpp', - version : '1.28.5', + version : '1.28.7', meson_version : '>= 1.4', default_options : 'warning_level=1', 'buildtype=debugoptimized', @@ -535,7 +535,8 @@ gnome = import('gnome') build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) gir_init_section = '--add-init-section=extern void gst_init(gint*,gchar**);' + \ - 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ + 'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \ + 'g_setenv("GST_REGISTRY_1_0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ 'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \ 'g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);' + \ 'g_setenv("GST_TRACERS", "", TRUE);' + \
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/po/gst-plugins-bad-1.0.pot -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/po/gst-plugins-bad-1.0.pot
Changed
@@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad-1.28.5\n" +"Project-Id-Version: gst-plugins-bad-1.28.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-07-08 23:42+0200\n" +"POT-Creation-Date: 2026-09-07 20:11+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/po/gst-plugins-bad.pot -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/po/gst-plugins-bad.pot
Changed
@@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gst-plugins-bad-1.28.5\n" +"Project-Id-Version: gst-plugins-bad-1.28.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-07-08 23:42+0200\n" +"POT-Creation-Date: 2026-09-07 20:11+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/release-notes-1.28.md -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/release-notes-1.28.md
Changed
@@ -2,11 +2,11 @@ GStreamer 1.28.0 was originally released on 27 January 2026. -The latest bug-fix release in the stable 1.28 series is 1.28.5(#1.28.5) and was released on 08 July 2026. +The latest bug-fix release in the stable 1.28 series is 1.28.7(#1.28.7) and was released on 07 September 2026. See https://gstreamer.freedesktop.org/releases/1.28/latest for the latest version of this document. -*Last updated: Wednesday 08 July 2026, 23:00 UTC (log)gitlog* +*Last updated: Monday 07 September 2026, 20:00 UTC (log)gitlog* latest: https://gstreamer.freedesktop.org/releases/1.28/ gitlog: https://gitlab.freedesktop.org/gstreamer/www/commits/main/src/htdocs/releases/1.28/release-notes-1.28.md @@ -2590,6 +2590,356 @@ - List of Merge Requests applied in 1.28.5(https://gitlab.freedesktop.org/groups/gstreamer/-/merge_requests?scope=all&utf8=%E2%9C%93&state=merged&milestone_title=1.28.5) - List of Issues fixed in 1.28.5(https://gitlab.freedesktop.org/groups/gstreamer/-/work_items?scope=all&utf8=%E2%9C%93&state=closed&milestone_title=1.28.5) +<a id="1.28.6"></a> + +### 1.28.6 + +The sixth 1.28 bug-fix release (1.28.6) was released on 05 August 2026. + +This release only contains bugfixes and important security fixessecurity. +It *should* be safe to update from 1.28.x and we recommend you do so at your +earliest convenience. + +security: https://gstreamer.freedesktop.org/security/ + +#### Highlighted bugfixes in 1.28.6 + + - Various security fixessecurity and playback fixes + - playbin3, playbin: fix stalls after re-enabling previously disabled subtitles + - Fix regression in core if a pad is re-linked while changed sticky events are being pushed + - dtls/webrtc: fix some issues with OpenSSL 4.0.0 + - RTP retransmission bitrate estimation fixes + - Fix RTP depayloading of SMPTE ST291 frames with multiple ANC packets + - Add H.266 muxing support to the Rust (f)mp4 muxers + - Better handling of input buffers without timestamps in Rust (f)mp4 muxers + - webrtcsink H.264 level/profile negotiation fixes and support for nvv4l2h265enc encoder + - SMPTE ST2038 ancillary metadata and closed caption combiner improvements + - Fix SEI insertion into H.265/HEVC streams with alpha + - Windows D3D11 WinRT screen capture element fixes + - Improved coded buffer size handling for VA encoders + - Textaccumulate: various tweaks how the element outputs text, plus better handling of French punctuation + - hlssink3: improved handling of input buffers without timestamps + - Fix build against FFmpeg 9.0 + - cerbero: fix Windows packages binary size increase regression; upgrade libsrt recipe to 1.5.6 + - Various bug fixes, build fixes, memory leak fixes, and other stability and reliability improvements + +#### gstreamer + + - baseparse: Don't reset infer_ts/pts_interpolate subclass configuration in reset() and related fixes(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12102) + - cpuid: fix AArch64 NEON detection to check HWCAP_ASIMD, not HWCAP_NEON(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12224) + - pad: fix livelock when pushing changed sticky events when the pad is re-linked(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12142) + - valve: Don't send a reconfigure even when setting the `drop` property to the same value(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12082) + - meson: Make the g-ir-scanner init section consistent across modules(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12163) + - meson: use dependency('dl') instead of cc.find_library('dl')(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12154) + +#### gst-plugins-base + + - gl/eagl: Fix GstGLUIView leak from duplicate __bridge_retained(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12118) + - playsink: don't wait for text pad block during reconfiguration(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12178) + - typefind: Actually register various forgotten typefinders(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12098) + - meson: Make the g-ir-scanner init section consistent across modules(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12163) + - Remove incorrect G_GNUC_CONST annotation for _get_type() functions and some other functions(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12157) + +#### gst-plugins-good + + - aacparse: Don't assert on parsing errors or insufficient data(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12143) + - avidemux: Make sure enough data is available when parsing FUJIFILM strd and various other fixes(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12241) + - matroskademux: Make sure enough data is available when parsing FLAC headers(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12242) + - rtph264depay: rtph265depay: Limit the maximum fragmentation unit size(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12244) + - rtpqcelpdepay: Handle changes in interleave value correctly(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12237) + - rtpsource: fix bitrate estimation for RTX(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12171) + - v4l2: Use MPLANE flag to determine n_v4l_planes directly(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12177) + - y4mdec: Some parsing fixes(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12122) + - tests: qtmux: drain to EOS before teardown in test_caps_renego(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12200) + - Remove incorrect G_GNUC_CONST annotation for _get_type() functions and some other functions(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12157) + +#### gst-plugins-bad + + - adpcmdec: Fix IMA ADPCM input size check to match with the actual code(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12245) + - baseparse: Don't reset infer_ts/pts_interpolate subclass configuration in reset() and related fixes(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12102) + - d3d11winrtcapture: Fix incorrect capture height(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12115) + - dtls: make BIO read signal retry instead of EOF when no data(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12191) + - dtls: New DTLS test failure with OpenSSL 4.0.0(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5234) + - dvdspu: Fix too strict off-by-one bounds check in a couple of places(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12126) + - h263parse: diracparse: Sync baseparse configuration with other compressed video parsers(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12096) + - h265parser: Fix out-of-bounds writes in RPS parsing(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12239) + - h265seiinserter: Fix HEVC with alpha stream handling(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12189) + - h266parser: fix SEI parsing error handler(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12132) + - meson: Make the g-ir-scanner init section consistent across modules(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12163) + - mpegpsdemux: Use byte readers for parsing data and make sure enough data is available(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12183) + - openjpegdec: Various issues related to striped mode and image origins, plus memory leaks(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12246) + - pnmdec: Don't assert if creating the output state fails and don't flush more data than is available(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12124) + - tfliteinference: fix leaks(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/11404) + - tsdemux: Don't assert if stream pad was not yet created(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12162) + - vabaseenc: clamp driver-reported coded size to the coded buffer size(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12123) + - vtdec: Don't register the hw-only variant on simulators(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12112) + - vulkantrash: avoid reinitializing trash objects multiple times(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12117) + - waylandsink: Omit reporting drop frame on preroll(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12037) + - webrtcbin: fix possible floating leak for post-aux(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12085) + - wlvideobufferpool: Fix memory leak in gst_wl_video_buffer_pool_alloc_buffer(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12160) + - docs: Fix build when mse library is disabled(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12113) + - Remove incorrect G_GNUC_CONST annotation for _get_type() functions and some other functions(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12157) + +#### gst-plugins-ugly + + - asfdemux: Avoid integer overflows during bounds checks(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12243) + - dvdsubdec: Clip subpicture rectangle to the frame size(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12240) + - rtpasfdepay: Drop packets that are larger than the negotiated maximum packet size and various other fixes(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12236) + +#### GStreamer Rust plugins + + - hlsbasesink: Don't unwrap() running_time when a segment is added(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3175) + - hlssink3: don't unwrap() PTS of a fragment's first buffer(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3193) + - isobmff: Add support for video/x-h266(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3165) + - isofmp4mux: use previous highest PTS when none are available(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3180) + - rtp: fix overflowing adds(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3187) + - rtpsmpte291depay: Fix depayloading frames with multiple ANC packets(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3161) + - rtprecv: fix deadlock handling RTCP packet in buffer list(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3190) + - st2038combiner: Fix off-by-one when ST-2038 pads are skewed(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3156) + - textaccumulate: output joined single buffer, add list as meta(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3150) + - webrtc: add support for nvv4l2h265enc(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3160) + - webrtcsink: handle level-asymmetry-allowed when answering(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3184) + - meson: Work around openssl-sys detection bug on Windows(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3158) + - meson: Sort entries for deterministic build results(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3209) + - Clippy and cargo test fixes(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3182) + - Fix some hotdoc markdown code blocks in various docs(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3172) + +#### gst-libav + + - Fix build failure with FFmpeg 9.0(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12221) + - libav: FFmpeg 9.0 Build Failure(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5251) + - avdemux: Close demuxer on pad deactivation instead of state change and don't use uninitialized audio channel positions(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12099) + - avdemux: Use a dynamic-sized array for the AVStreams(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12238) + +#### gst-rtsp-server + + - rtsp-server: fix racy leak in test_pool_thread_copy under valgrind(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12201) + - meson: Make the g-ir-scanner init section consistent across modules(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12163) + +#### gstreamer-sharp + + - No changes + +#### gst-python + + - meson: use dependency('dl') instead of cc.find_library('dl')(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12154) + +#### gst-editing-services + + - meson: Make the g-ir-scanner init section consistent across modules(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12163) + - Remove incorrect G_GNUC_CONST annotation for _get_type() functions and some other functions(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12157) + +#### gst-devtools, gst-validate + gst-integration-testsuites + + - meson: Make the g-ir-scanner init section consistent across modules and fix validate g-ir-scanner invocation so that it doesn't load any plugins(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12163) + - meson: use dependency('dl') instead of cc.find_library('dl')(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12154) + - Remove incorrect G_GNUC_CONST annotation for _get_type() functions and some other functions(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12157) + +#### gst-examples + + - No changes + +#### gstreamer-docs + + - No changes + +#### Development build environment + + - No changes + +#### Cerbero build tool and packaging changes in 1.28.6 + + - gst-plugins-rs: Don't incorrectly package .lib plugin static libs, fixing package binary size regression(https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/2307) + - windows inno installer: add support for v7(https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/2316) + - soundtouch: download the tarball from surina.net vice codeberg.org(https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/2302) + - srt: upgrade to 1.5.6(https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/2310) + - windows.config: fix Windows MinGW cross compilation for certain Rust recipes(https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/2304) + +#### Contributors to 1.28.6 + +Albert Sjölund, Bernhard M. Wiedemann, Charles Turner, Diego Nieto, +Emiel Van Severen, François Laignel, Gareth Sylvester-Bradley, He Junyan, +Ingmar Steen, Jan Schmidt, Jeongkeun Kim, Jerome Colle, Jihoon Lee, +L. E. Segovia, Maksim Nikolaev, Marcus Hanestad, Mathieu Duponchelle, +Matthew Waters, Nicolas Dufresne, Nirbheek Chauhan, Olivier Crête, +Piotr Brzeziński, Qi Hou, Reilly Brogan, Sanchayan Maity, Sebastian Dröge, +Seungha Yang, Seyi Kuforiji, Thibault Saunier, Tim-Philipp Müller, +Tjitte de Wert, + +... and many others who have contributed bug reports, translations, sent +suggestions or helped testing. Thank you all! + +#### List of merge requests and issues fixed in 1.28.6 + +- List of Merge Requests applied in 1.28.6(https://gitlab.freedesktop.org/groups/gstreamer/-/merge_requests?scope=all&utf8=%E2%9C%93&state=merged&milestone_title=1.28.6) +- List of Issues fixed in 1.28.6(https://gitlab.freedesktop.org/groups/gstreamer/-/work_items?scope=all&utf8=%E2%9C%93&state=closed&milestone_title=1.28.6) + +<a id="1.28.7"></a> + +### 1.28.7 + +The seventh 1.28 bug-fix release (1.28.7) was released on 07 September 2026. + +This release only contains bugfixes and important security fixessecurity. +It *should* be safe to update from 1.28.x and we recommend you do so at your +earliest convenience. + +security: https://gstreamer.freedesktop.org/security/ + +#### Highlighted bugfixes in 1.28.7 + + - Various security fixessecurity and playback fixes + - appsrc EOS handling regression fix for applications pushing EOS into a blocked appsrc + - glcolorconvert fixes for older OpenGL/GLSL versions + - mxfdemux: Fix keyframe detection regression and possible artefacts after seeking + - QML6 GL Overlay output texture lifetime handling fixes + - opencv: Add support for building against OpenCV 5 + - hip: Add missing API version suffix in HIP support library filename and fix hipcc detection on Windows with HIP SDK 7.x + - analytics: fix classes off-by-one in ssdtensordec leading to mislabelling of objects in the examples + - isobmff: Fix min_display_mastering_luminance in mdcv box + - rtpbin2: rtprecv: limit the number of remote sources being tracked + - st2038anc: parity bit handling fixes for ST 291 ADF words + - video converter and videoconvertscale fixes + - mpegdemux: restore gap event sending in MPEG-PS demuxer + - Fix x264enc high bit depth support in binary packages + - Various bug fixes, build fixes, memory leak fixes, and other stability and reliability improvements + +#### gstreamer + + - cpuid: Clean up NEON and ASIMD getauxval detection + port Orc's elf_aux_info support(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12258) + - dataurisrc: Fix empty payloads and unsupported charset conversion(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12407) + - pipeline: Avoid lock inversion when handling GST_MESSAGE_RESET_TIME(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12421) + - validate: Use a single value type in configs lists(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12343) + +#### gst-plugins-base + + - appsrc: Don't push EOS directly in event handler (regression fix)(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12283) + - glcolorconvert: don't rely on integer modulus '%'(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12286) + - mikey: use TEK_WITH_SALT for proper key/salt separation in KEY_DATA(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12404) + - overlay-composition: Don't try to scale high bitdepth rectangles(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12330) + - rtpbasedepayload: Don't assert if previous buffer's delayed header extensions are still queued(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12444) + - rtsp: message: fix crash when an auth value started with whitespace(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12431) + - typefindhelper: Revert "Drop unnecessary check for factories without a function"(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12443) + - typefind: regression causes txt file to be detected as subtitle(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5285) + - typefindfunctions: Critical warnings when typefinding invalid ogv file(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5279) + - validate: Use a single value type in configs lists(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12343) + - video-converter: Fix GRAY output border color(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12374) + - video-format: Fix annotation on component function(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12425) + - videoconvertscale: keep input colorimetry in scale-only elements(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12378) + - videotimecode: Fix documentation bug and update annotations(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12255) + +#### gst-plugins-good + + - effectv: quarktv: read from mapped memory to reduce latency and improve performance(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12422) + - flxdec: Various read fixes(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12387) + - qml6gloverlay: output texture lifetime fixes(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12342) + - qtdemux: Add 'stream-format' field for AC-4 caps(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12371) + - qtdemux: Ensure enough data is available for reading closed caption boxes(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12437) + - rtpmanager: crash on malformed RTCP SDES due to uninitialized values being used(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5277) + - rtpmanager: Fix malformed SDES processing segfault(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12375) + - rtpsession: implement DoS protection mechanisms(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12436) + - scaletempo: fix integer overflow in output_overlap_s16(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12265) + - soup: fix redirect uri when not using automatic redirects(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12391) + - souphttpsrc: Add new `location-trusted` property(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12438) + +#### gst-plugins-bad + + - amc: Don't set the Hardware class in metadata for sw video codecs(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12327) + - d3d12: Fix copy-paste typos(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12368) + - d3d12cmdqueue: Fix deadlock during GC(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12353) + - d3d12screencapturesrc: Fix out-of-bounds access with monochrome cursors(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12320) + - dwritebaseoverlay: Fix assertion 'G_VALUE_HOLDS_UINT (value)'(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12323) + - hip: Add missing API version suffix in library filename(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12299) + - gstreamer-hip api_version failure(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5245) + - hip: Fix hipcc detection on Windows with HIP SDK 7.x(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12332) + - hipstream: Return actual device_id instead of vendor from device_id getter(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12394) + - hipmemorycopy: Add missing ifdef guard(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12361) + - jpegparse: Fix byte order of JFIF density fields(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12259) + - mpegdemux: restore gap sending(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12400) + - mxfdemux: Fix keyframe detection(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12324) + - onnx: Fix nullptr dereference on ORT init failure(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12295) + - onnxinference: fix dead lock with wrong model file(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12329) + - opencv: Support OpenCV 5(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12363) + - pnmdec: Protect against bogus dimensions headers(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12390) + - ssdtensordec: The classes were off by one(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12256) + - tsdemux: Add 'stream-format' field for AC-4 caps(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12371) + - validate: Use a single value type in configs lists(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12343) + - vulkan(av1,vp9)dec: set access NONE at buffer pool allocation parameters(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12417) + +#### gst-plugins-ugly + + - No changes + +#### GStreamer Rust plugins + + - isobmff: Fix min_display_mastering_luminance in mdcv box(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3227) + - rtprecv: limit the number of remote sources being tracked(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3229) + - rtspsrc2: Fix handling of scheme and parameter parsing(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3237) + - st2038anc: Fix inverted even/odd parity on ST 291 ADF words(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3217) + - Fix a couple of new Rust 1.97 clippy warnings(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3198) + - Sort entries for deterministic build results(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3209) + - Update dependencies(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3200) + - closedcaption: update to winnow to 1.0(https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/3220) + +#### gst-libav + + - avauddec, avaudenc: Don't try channel layout mapping with >64 channels(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12439) + +#### gst-rtsp-server + + - No changes + +#### gstreamer-sharp + + - No changes + +#### gst-python + + - No changes + +#### gst-editing-services + + - validate: Use a single value type in configs lists(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12343) + +#### gst-devtools, gst-validate + gst-integration-testsuites + + - validate: Use a single value type in configs lists(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12343) + +#### gst-examples + + - No changes + +#### gstreamer-docs + + - No changes + +#### Development build environment + + - wraps: macos-bison-binary: Fix cross-compile when host/build machine cpu family differ(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12312) + - wraps: update libnice to 0.1.24(https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12402) + +#### Cerbero build tool and packaging changes in 1.28.7 + + - x264: Fix high bit-depth support(https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/2328) + - libnice: update to 0.1.24(https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/2336) + +#### Contributors to 1.28.7 + +Aisuneko icecat, Antonio Rojas, Colin Kinloch, Dominique Leroux, Edward Hervey, +Eric Chandrasekhar,François Laignel, Frank Wennerdahl, Gareth Sylvester-Bradley, +Jan Schmidt, Lei Zhen, L. E. Segovia, Marcus Hanestad, Mark Nauwelaerts, +masa-iwm, Mathieu Duponchelle, Matthew Waters, Nirbheek Chauhan, Pablo García, +Sanchayan Maity, Sebastian Dröge, Seungha Yang, Seyi Kuforiji, Stéphane Cerveau, +Thibault Saunier, Thomas Devoogdt, Tim-Philipp Müller, YoungSoo Lee, + +... and many others who have contributed bug reports, translations, sent +suggestions or helped testing. Thank you all! + +#### List of merge requests and issues fixed in 1.28.7 + +- List of Merge Requests applied in 1.28.7(https://gitlab.freedesktop.org/groups/gstreamer/-/merge_requests?scope=all&utf8=%E2%9C%93&state=merged&milestone_title=1.28.7) +- List of Issues fixed in 1.28.7(https://gitlab.freedesktop.org/groups/gstreamer/-/work_items?scope=all&utf8=%E2%9C%93&state=closed&milestone_title=1.28.7) + ## Schedule for 1.30 Our next major feature release will be 1.30, and 1.29 will be the unstable
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/androidmedia/gstamc.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/androidmedia/gstamc.c
Changed
@@ -76,6 +76,52 @@ } } +/* Whether a video codec is hardware-accelerated. Used for both the element + * rank and the "Hardware" element klass. */ +gboolean +gst_amc_codec_info_is_hardware (const GstAmcCodecInfo * codec_info) +{ + switch (codec_info->accel) { + case AMC_CODEC_ACCEL_IS_HW: + return TRUE; + case AMC_CODEC_ACCEL_IS_SW: + return FALSE; + case AMC_CODEC_ACCEL_IS_UNKNOWN: + /* Android version is too old, could not auto-detect hw-accel status. + * Try guessing from the name. + * + * Amlogic/Exynos hardware video codecs end in .encoder/.decoder: + * c2.amlogic.avc.decoder + * c2.amlogic.avc.encoder + * c2.amlogic.hevc.decoder + * c2.amlogic.av1.decoder + * c2.exynos.h264.decoder + * c2.exynos.h264.encoder + * c2.exynos.hevc.decoder + * c2.exynos.hevc.encoder + * c2.exynos.vp9.decoder + * c2.exynos.vp9.encoder + * NOTE: c2.google.av1.decoder can be a hw decoder, but it's only + * available in newer Android versions and codec_info->accel + * will work reliably there. + * Software video codecs end in .sw or .secure (usually?): + * c2.amlogic.vp8.decoder.sw + * c2.amlogic.wmv3.decoder.sw + * c2.amlogic.avc.decoder.secure + * As an aside, software audio codecs look like this: + * c2.amlogic.audio.decoder.mp2 + * c2.amlogic.audio.decoder.eac3 + * But this guess is only used for video. + */ + return (g_str_has_prefix (codec_info->name, "c2.amlogic") || + g_str_has_prefix (codec_info->name, "c2.exynos")) && + (g_str_has_suffix (codec_info->name, "decoder") || + g_str_has_suffix (codec_info->name, "encoder")); + } + + return FALSE; +} + static gboolean scan_codecs (GstPlugin * plugin) { @@ -1837,50 +1883,10 @@ /* Give PRIMARY+1 rank to all hardware-accelerated video codecs and * MARGINAL to sw video codecs, because any gstreamer-native codecs * compiled-in may be higher quality */ - switch (codec_info->accel) { - case AMC_CODEC_ACCEL_IS_HW: - rank = GST_RANK_PRIMARY + 1; - break; - case AMC_CODEC_ACCEL_IS_SW: - rank = GST_RANK_MARGINAL; - break; - case AMC_CODEC_ACCEL_IS_UNKNOWN: - /* Android version is too old, could not auto-detect hw-accel - * status. Try guessing from the name. - * - * Amlogic/Exynos hardware video codecs end in .encoder/.decoder: - * c2.amlogic.avc.decoder - * c2.amlogic.avc.encoder - * c2.amlogic.hevc.decoder - * c2.amlogic.av1.decoder - * c2.exynos.h264.decoder - * c2.exynos.h264.encoder - * c2.exynos.hevc.decoder - * c2.exynos.hevc.encoder - * c2.exynos.vp9.decoder - * c2.exynos.vp9.encoder - * NOTE: c2.google.av1.decoder can be a hw decoder, but it's only - * available in newer Android versions and codec_info->accel - * will work reliably there. - * Software video codecs end in .sw or .secure (usually?): - * c2.amlogic.vp8.decoder.sw - * c2.amlogic.wmv3.decoder.sw - * c2.amlogic.avc.decoder.secure - * As an aside, software audio codecs look like this: - * c2.amlogic.audio.decoder.mp2 - * c2.amlogic.audio.decoder.eac3 - * But we only rank video here. - */ - if ((g_str_has_prefix (codec_info->name, "c2.amlogic") || - g_str_has_prefix (codec_info->name, "c2.exynos")) && - (g_str_has_suffix (codec_info->name, "decoder") || - g_str_has_suffix (codec_info->name, "encoder"))) { - rank = GST_RANK_PRIMARY + 1; - } else { - rank = GST_RANK_MARGINAL; - } - break; - } + if (gst_amc_codec_info_is_hardware (codec_info)) + rank = GST_RANK_PRIMARY + 1; + else + rank = GST_RANK_MARGINAL; } else if (g_str_has_prefix (codec_info->name, "OMX.google.") || g_str_has_prefix (codec_info->name, "c2.android.") || g_str_has_prefix (codec_info->name, "c2.amlogic.") ||
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/androidmedia/gstamc.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/androidmedia/gstamc.h
Changed
@@ -63,6 +63,8 @@ gboolean gst_amc_static_init (void); +gboolean gst_amc_codec_info_is_hardware (const GstAmcCodecInfo * codec_info); + GstVideoFormat gst_amc_color_format_to_video_format (const GstAmcCodecInfo * codec_info, const gchar * mime, gint color_format); gint gst_amc_video_format_to_color_format (const GstAmcCodecInfo * codec_info, const gchar * mime, GstVideoFormat video_format);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/androidmedia/gstamcvideodec.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/androidmedia/gstamcvideodec.c
Changed
@@ -393,7 +393,8 @@ longname = g_strdup_printf ("Android MediaCodec %s", codec_info->name); gst_element_class_set_metadata (element_class, codec_info->name, - "Codec/Decoder/Video/Hardware", + gst_amc_codec_info_is_hardware (codec_info) ? + "Codec/Decoder/Video/Hardware" : "Codec/Decoder/Video", longname, "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); g_free (longname); }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/androidmedia/gstamcvideoenc.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/androidmedia/gstamcvideoenc.c
Changed
@@ -525,7 +525,8 @@ longname = g_strdup_printf ("Android MediaCodec %s", codec_info->name); gst_element_class_set_metadata (element_class, codec_info->name, - "Codec/Encoder/Video/Hardware", + gst_amc_codec_info_is_hardware (codec_info) ? + "Codec/Encoder/Video/Hardware" : "Codec/Encoder/Video", longname, "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); g_free (longname); }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/applemedia/vtdec.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/applemedia/vtdec.c
Changed
@@ -2317,7 +2317,7 @@ gst_vtdec_init_once (); -#if !TARGET_OS_WATCH +#if !TARGET_OS_WATCH && !TARGET_OS_SIMULATOR #if MAC_OS_X_VERSION_MAX_ALLOWED < 140000 if (__builtin_available (macOS 10.9, iOS 17.0, tvOS 17.0, *)) #else @@ -2329,7 +2329,7 @@ return gst_element_register (plugin, "vtdec", rank, GST_TYPE_VTDEC); } -#if !TARGET_OS_WATCH +#if !TARGET_OS_WATCH && !TARGET_OS_SIMULATOR static gboolean gst_vtdec_register_vtdec_hw (GstPlugin * plugin) { @@ -2349,7 +2349,7 @@ #endif GST_ELEMENT_REGISTER_DEFINE_CUSTOM (vtdec, gst_vtdec_register_vtdec); -#if !TARGET_OS_WATCH +#if !TARGET_OS_WATCH && !TARGET_OS_SIMULATOR GST_ELEMENT_REGISTER_DEFINE_CUSTOM (vtdec_hw, gst_vtdec_register_vtdec_hw); #endif @@ -2358,7 +2358,7 @@ { gboolean ret = FALSE; -#if !TARGET_OS_WATCH +#if !TARGET_OS_WATCH && !TARGET_OS_SIMULATOR ret |= GST_ELEMENT_REGISTER (vtdec_hw, plugin); #endif ret |= GST_ELEMENT_REGISTER (vtdec, plugin);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/d3d11/gstd3d11winrtcapture.cpp -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/d3d11/gstd3d11winrtcapture.cpp
Changed
@@ -968,7 +968,7 @@ self->height = desc.Height; if (!self->window_handle || !self->client_only) { self->capture_width = self->width; - self->capture_height = self->capture_height; + self->capture_height = self->height; } size_changed = TRUE;
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/d3d12/gstd3d12dxgicapture.cpp -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/d3d12/gstd3d12dxgicapture.cpp
Changed
@@ -256,6 +256,7 @@ stride_ = width_ * 4; UINT pstride = 4; auto size = height_ * stride_; + auto mask_offset = height_ * shape_info.Pitch; texture_.resize (size); xor_texture_.resize (size); @@ -267,7 +268,7 @@ for (UINT col = 0; col < width_; col++) { auto src_pos = (row * shape_info.Pitch) + (col / 8); auto and_mask = (shape_buffersrc_pos >> (7 - (col % 8))) & 0x1; - auto xor_mask = (shape_buffersrc_pos + size >> (7 - (col % 8))) & 0x1; + auto xor_mask = (shape_buffersrc_pos + mask_offset >> (7 - (col % 8))) & 0x1; auto dst_pos = (row * stride_) + (col * pstride); if (and_mask) {
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/dwrite/gstdwritebaseoverlay.cpp -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/dwrite/gstdwritebaseoverlay.cpp
Changed
@@ -334,7 +334,7 @@ } case PROP_AUTO_RESIZE: { - gboolean auto_resize = g_value_get_uint (value); + gboolean auto_resize = g_value_get_boolean (value); if (auto_resize != priv->auto_resize) { priv->auto_resize = auto_resize; priv->text_format = nullptr;
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/hip/gsthipmemorycopy.cpp -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/hip/gsthipmemorycopy.cpp
Changed
@@ -588,6 +588,7 @@ gst_hip_memory_copy_before_transform (GstBaseTransform * trans, GstBuffer * buffer) { +#ifdef HAVE_GST_CUDA auto self = GST_HIP_MEMORY_COPY (trans); auto priv = self->priv; @@ -678,6 +679,7 @@ gst_hip_memory_copy_set_caps (trans, priv->in_caps, priv->out_caps); gst_base_transform_reconfigure_src (trans); } +#endif } static GstCaps *
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/hip/meson.build -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/hip/meson.build
Changed
@@ -34,12 +34,12 @@ have_nvcc = false if not hip_precompile_amd_opt.disabled() and not meson.is_cross_build() if host_system == 'windows' - hipcc = find_program('hipcc.bin', required: false) + hipcc = find_program('hipcc.bin', 'hipcc.exe', required: false) if not hipcc.found() hip_root = run_command(python3, '-c', 'import os; print(os.environ.get("HIP_PATH"))', check: false).stdout().strip() if hip_root != '' and hip_root != 'None' hip_bin_path = join_paths(hip_root, 'bin') - hipcc = find_program('hipcc.bin', + hipcc = find_program('hipcc.bin', 'hipcc.exe', dirs: hip_bin_path, required: hip_precompile_amd_opt) endif
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/kms/gstkmsallocator.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/kms/gstkmsallocator.h
Changed
@@ -71,7 +71,7 @@ GstAllocatorClass parent_class; }; -GType gst_kms_allocator_get_type (void) G_GNUC_CONST; +GType gst_kms_allocator_get_type (void); gboolean gst_is_kms_memory (GstMemory *mem); guint32 gst_kms_memory_get_fb_id (GstMemory *mem);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/kms/gstkmsbufferpool.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/kms/gstkmsbufferpool.h
Changed
@@ -75,7 +75,7 @@ GstVideoBufferPoolClass parent_class; }; -GType gst_kms_buffer_pool_get_type (void) G_GNUC_CONST; +GType gst_kms_buffer_pool_get_type (void); GstBufferPool *gst_kms_buffer_pool_new (void);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/kms/gstkmssink.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/kms/gstkmssink.h
Changed
@@ -114,7 +114,7 @@ GstVideoSinkClass parent_class; }; -GType gst_kms_sink_get_type (void) G_GNUC_CONST; +GType gst_kms_sink_get_type (void); GST_ELEMENT_REGISTER_DECLARE (kmssink); G_END_DECLS
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/va/gstvaav1enc.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/va/gstvaav1enc.c
Changed
@@ -2512,6 +2512,9 @@ We do not calculate SpeedAdj and do not consider still_picture. */ base->codedbuf_size = un_compressed_size / self->cr; + base->codedbuf_size = gst_va_base_enc_adjust_coded_buffer_size (base, + base->codedbuf_size, self->rc.rc_ctrl_mode, self->rc.target_bitrate_bits); + GST_INFO_OBJECT (self, "Calculate codedbuf size: %u", base->codedbuf_size); } @@ -3967,6 +3970,7 @@ GstVaAV1EncFrame *frame_enc; GstBuffer *buf = NULL; guint num; + gboolean corrupt = FALSE; g_assert ((_enc_frame (last_frame)->flags & FRAME_TYPE_REPEAT) == 0); g_assert ((_enc_frame (last_frame)->flags & FRAME_FLAG_NOT_SHOW) == 0); @@ -3998,10 +4002,15 @@ goto error; } + if (frame_enc->base.picture->corrupt) + corrupt = TRUE; + offset += frame_size; } frame_enc = _enc_frame (last_frame); + /* If any frame is corrupt, make the whole TU as corrupt. */ + frame_enc->base.picture->corrupt |= corrupt; if (frame_enc->cached_frame_header_size > 0) { memcpy (data + offset, frame_enc->cached_frame_header,
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/va/gstvabaseenc.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/va/gstvabaseenc.c
Changed
@@ -264,36 +264,165 @@ return gst_va_buffer_importer_import (&importer, inbuf, buf); } -GstBuffer * -gst_va_base_enc_create_output_buffer (GstVaBaseEnc * base, - GstVaEncodePicture * picture, const guint8 * prefix_data, - guint prefix_data_len) +guint +gst_va_base_enc_adjust_coded_buffer_size (GstVaBaseEnc * base, + guint codedbuf_size, guint32 rc_ctrl_mode, guint bitrate_bits) +{ + guint64 want = 0; + + /* Underflow is not allowed in CBR mode, so the driver may pad + * every frame up to the per-frame budget (bitrate/framerate). + * We double that budget to ensure safety. */ + if (rc_ctrl_mode == VA_RC_CBR && bitrate_bits > 0) { + gint fps_n = GST_VIDEO_INFO_FPS_N (&base->in_info); + gint fps_d = GST_VIDEO_INFO_FPS_D (&base->in_info); + + /* variable or unknown framerate, assume a default bitrate */ + if (fps_n <= 0 || fps_d <= 0) { + fps_n = 30; + fps_d = 1; + } + + want = 2 * (gst_util_uint64_scale (bitrate_bits, fps_d, fps_n) / 8); + if (codedbuf_size < want) { + codedbuf_size = MIN (want, (guint64) G_MAXINT); + GST_INFO_OBJECT (base, "Raise codedbuf size to %u", codedbuf_size); + } + } + + return codedbuf_size; +} + +/* We can not fully trust the segment information reported by the driver. + * Some buggy driver may set seg->buf or seg->buf+seg->size outside of our + * coded_buffer and cause crash. + * Our check policy is making sure each seg->buf and seg->buf+seg->size + * inside base_addr to base_addr+codedbuf_size, where most of the time + * base_addr is the address of the first seg->buf in seg_list. + */ +static guint +gst_va_base_enc_get_segment_safe_size (GstVaBaseEnc * base, + const guint8 * base_addr, VACodedBufferSegment * seg, gboolean * corrupt) +{ + const guint8 *buf = seg->buf; + + if (!seg->size) + return seg->size; + + if (seg->status & VA_CODED_BUF_STATUS_BAD_BITSTREAM) { + GST_WARNING_OBJECT (base, "coded buffer segment flagged as corrupt by the " + "driver (status %#x)", seg->status); + *corrupt = TRUE; + seg->size = 0; + return 0; + } + + if (seg->status & VA_CODED_BUF_STATUS_SLICE_OVERFLOW_MASK) { + GST_WARNING_OBJECT (base, "coded buffer segment flagged as overflow by the " + "driver (status %#x)", seg->status); + *corrupt = TRUE; + } + + if (!buf || buf < base_addr || buf >= base_addr + base->codedbuf_size) { + GST_WARNING_OBJECT (base, "coded buffer segment start at (%p, %u bytes) is " + "out of range", buf, seg->size); + *corrupt = TRUE; + seg->size = 0; + return 0; + } + + /* clamp the reported size to what remains inside the mapping */ + if (buf + seg->size > base_addr + base->codedbuf_size) { + GST_WARNING_OBJECT (base, "coded buffer segment (%p, %u bytes) overflows, " + "clamp it", buf, seg->size); + *corrupt = TRUE; + + seg->size = base->codedbuf_size - (guint) (buf - base_addr); + } + + return seg->size; +} + +static gboolean +gst_va_base_enc_map_coded_buffer (GstVaBaseEnc * base, + GstVaEncodePicture * picture, VACodedBufferSegment ** seg_list) { - guint coded_size; - goffset offset; - GstBuffer *buf = NULL; VASurfaceID surface; - VACodedBufferSegment *seg, *seg_list; + VACodedBufferSegment *segs = NULL; - /* Wait for encoding to finish */ surface = gst_va_encode_picture_get_raw_surface (picture); + /* Wait for encoding to finish */ if (!va_sync_surface (base->display, surface)) - goto error; + return FALSE; - seg_list = NULL; if (!va_map_buffer (base->display, picture->coded_buffer, - GST_MAP_READ, (gpointer *) & seg_list)) - goto error; + GST_MAP_READ, (gpointer *) & segs)) + return FALSE; - if (!seg_list) { + if (!segs) { va_unmap_buffer (base->display, picture->coded_buffer); GST_WARNING_OBJECT (base, "coded buffer has no segment list"); - goto error; + return FALSE; + } + + *seg_list = segs; + return TRUE; +} + +static gboolean +gst_va_base_enc_map_and_measure_coded_buffer (GstVaBaseEnc * base, + GstVaEncodePicture * picture, VACodedBufferSegment ** seg_list, + guint * coded_size) +{ + const guint8 *base_addr; + VACodedBufferSegment *seg; + + if (!gst_va_base_enc_map_coded_buffer (base, picture, seg_list)) + return FALSE; + + base_addr = (*seg_list)->buf; + *coded_size = 0; + for (seg = *seg_list; seg; seg = seg->next) + *coded_size += gst_va_base_enc_get_segment_safe_size (base, base_addr, seg, + &picture->corrupt); + + return TRUE; +} + +static guint +gst_va_base_enc_copy_coded_segments (VACodedBufferSegment * seg_list, + const guint8 * prefix_data, guint prefix_data_len, guint8 * dst) +{ + VACodedBufferSegment *seg; + guint offset = 0; + + if (prefix_data) { + g_assert (prefix_data_len > 0); + memcpy (dst, prefix_data, prefix_data_len); + offset = prefix_data_len; } - coded_size = 0; - for (seg = seg_list; seg; seg = seg->next) - coded_size += seg->size; + for (seg = seg_list; seg; seg = seg->next) { + memcpy (dst + offset, seg->buf, seg->size); + offset += seg->size; + } + + return offset; +} + +GstBuffer * +gst_va_base_enc_create_output_buffer (GstVaBaseEnc * base, + GstVaEncodePicture * picture, const guint8 * prefix_data, + guint prefix_data_len) +{ + guint coded_size; + GstBuffer *buf = NULL; + GstMapInfo info; + VACodedBufferSegment *seg_list = NULL; + + if (!gst_va_base_enc_map_and_measure_coded_buffer (base, picture, &seg_list, + &coded_size)) + return NULL; buf = gst_video_encoder_allocate_output_buffer (GST_VIDEO_ENCODER_CAST (base), coded_size + prefix_data_len); @@ -301,35 +430,23 @@ va_unmap_buffer (base->display, picture->coded_buffer); GST_ERROR_OBJECT (base, "Failed to allocate output buffer, size %d", coded_size); - goto error; + return NULL; } - offset = 0; - if (prefix_data) { - g_assert (prefix_data_len > 0); - gst_buffer_fill (buf, offset, prefix_data, prefix_data_len); - offset += prefix_data_len; + if (!gst_buffer_map (buf, &info, GST_MAP_WRITE)) { + gst_clear_buffer (&buf); + va_unmap_buffer (base->display, picture->coded_buffer); + GST_ERROR_OBJECT (base, "Failed to map output buffer"); + return NULL; } - for (seg = seg_list; seg; seg = seg->next) { - gsize write_size; - - write_size = gst_buffer_fill (buf, offset, seg->buf, seg->size); - if (write_size != seg->size) { - GST_WARNING_OBJECT (base, "Segment size is %d, but copied %" - G_GSIZE_FORMAT, seg->size, write_size); - break; - } - offset += seg->size; - } + gst_va_base_enc_copy_coded_segments (seg_list, prefix_data, prefix_data_len, + info.data); + gst_buffer_unmap (buf, &info); va_unmap_buffer (base->display, picture->coded_buffer); return buf; - -error: - gst_clear_buffer (&buf); - return NULL; } /* Return 0 means error and -1 means not enough data. */ @@ -338,29 +455,12 @@ GstVaEncodePicture * picture, guint8 * data, gint size) { guint coded_size; - VASurfaceID surface; - VACodedBufferSegment *seg, *seg_list; + VACodedBufferSegment *seg_list = NULL; gint ret_sz = 0; - /* Wait for encoding to finish */ - surface = gst_va_encode_picture_get_raw_surface (picture); - if (!va_sync_surface (base->display, surface)) - goto out; - - seg_list = NULL; - if (!va_map_buffer (base->display, picture->coded_buffer, - GST_MAP_READ, (gpointer *) & seg_list)) - goto out; - - if (!seg_list) { - va_unmap_buffer (base->display, picture->coded_buffer); - GST_WARNING_OBJECT (base, "coded buffer has no segment list"); - goto out; - } - - coded_size = 0; - for (seg = seg_list; seg; seg = seg->next) - coded_size += seg->size; + if (!gst_va_base_enc_map_and_measure_coded_buffer (base, picture, &seg_list, + &coded_size)) + return 0; if (coded_size > size) { GST_DEBUG_OBJECT (base, "Not enough space for coded data"); @@ -368,14 +468,10 @@ goto out; } - for (seg = seg_list; seg; seg = seg->next) { - memcpy (data + ret_sz, seg->buf, seg->size); - ret_sz += seg->size; - } - - va_unmap_buffer (base->display, picture->coded_buffer); + ret_sz = gst_va_base_enc_copy_coded_segments (seg_list, NULL, 0, data); out: + va_unmap_buffer (base->display, picture->coded_buffer); return ret_sz; } @@ -462,13 +558,22 @@ goto error; } - if (frame->output_buffer) + if (frame->output_buffer) { + GstVaEncFrame *enc_frame = gst_va_get_enc_frame (frame); + + if (enc_frame && enc_frame->picture && enc_frame->picture->corrupt) { + GST_WARNING_OBJECT (base, "corrupt coded data in frame %u", + frame->system_frame_number); + GST_BUFFER_FLAG_SET (frame->output_buffer, GST_BUFFER_FLAG_CORRUPTED); + } + GST_LOG_OBJECT (base, "Push to downstream: frame system_frame_number: %u," " pts: %" GST_TIME_FORMAT ", dts: %" GST_TIME_FORMAT " duration: %" GST_TIME_FORMAT ", buffer size: %" G_GSIZE_FORMAT, frame->system_frame_number, GST_TIME_ARGS (frame->pts), GST_TIME_ARGS (frame->dts), GST_TIME_ARGS (frame->duration), gst_buffer_get_size (frame->output_buffer)); + } if (complete) { ret = gst_video_encoder_finish_frame (GST_VIDEO_ENCODER (base), frame);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/va/gstvabaseenc.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/va/gstvabaseenc.h
Changed
@@ -146,6 +146,10 @@ void gst_va_base_enc_add_codec_tag (GstVaBaseEnc * base, const gchar * codec_name); void gst_va_base_enc_reset_state (GstVaBaseEnc * base); +guint gst_va_base_enc_adjust_coded_buffer_size (GstVaBaseEnc * base, + guint codedbuf_size, + guint32 rc_ctrl_mode, + guint bitrate_bits); GstBuffer * gst_va_base_enc_create_output_buffer (GstVaBaseEnc * base, GstVaEncodePicture * picture, const guint8 * prefix_data,
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/va/gstvaencoder.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/va/gstvaencoder.c
Changed
@@ -1229,6 +1229,7 @@ pic->raw_buffer = gst_buffer_ref (raw_buffer); pic->reconstruct_buffer = reconstruct_buffer; pic->coded_buffer = coded_buffer; + pic->corrupt = FALSE; pic->params = g_array_sized_new (FALSE, FALSE, sizeof (VABufferID), 8);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/va/gstvaencoder.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/va/gstvaencoder.h
Changed
@@ -40,6 +40,7 @@ GstBuffer *reconstruct_buffer; VABufferID coded_buffer; + gboolean corrupt; }; gboolean gst_va_encoder_is_open (GstVaEncoder * self);
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/va/gstvafilter.h -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/va/gstvafilter.h
Changed
@@ -58,10 +58,10 @@ }; #define GST_TYPE_VA_SCALE_METHOD gst_va_scale_method_get_type() -GType gst_va_scale_method_get_type (void) G_GNUC_CONST; +GType gst_va_scale_method_get_type (void); #define GST_TYPE_VA_INTERPOLATION_METHOD gst_va_interpolation_method_get_type() -GType gst_va_interpolation_method_get_type (void) G_GNUC_CONST; +GType gst_va_interpolation_method_get_type (void); typedef struct _GstVaSample GstVaSample; struct _GstVaSample
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/va/gstvah264enc.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/va/gstvah264enc.c
Changed
@@ -1289,6 +1289,9 @@ /* Add 5% for safety */ base->codedbuf_size = (guint) ((gfloat) codedbuf_size * 1.05); + base->codedbuf_size = gst_va_base_enc_adjust_coded_buffer_size (base, + base->codedbuf_size, self->rc.rc_ctrl_mode, self->rc.target_bitrate_bits); + GST_DEBUG_OBJECT (self, "Calculate codedbuf size: %u", base->codedbuf_size); }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/va/gstvah265enc.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/va/gstvah265enc.c
Changed
@@ -3770,7 +3770,8 @@ codedbuf_size += self->partition.num_slices * (4 + GST_ROUND_UP_8 (MAX_SLICE_HDR_SIZE + MAX_SHORT_TERM_REFPICSET_SIZE) / 8); - base->codedbuf_size = codedbuf_size; + base->codedbuf_size = gst_va_base_enc_adjust_coded_buffer_size (base, + codedbuf_size, self->rc.rc_ctrl_mode, self->rc.target_bitrate_bits); GST_INFO_OBJECT (self, "Calculate codedbuf size: %u", base->codedbuf_size); }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/va/gstvavp8enc.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/va/gstvavp8enc.c
Changed
@@ -335,6 +335,10 @@ /* Safe choice, 2 times 4:2:0 framesize plus header. */ base->codedbuf_size = 3 * width * height + 1278; + + base->codedbuf_size = gst_va_base_enc_adjust_coded_buffer_size (base, + base->codedbuf_size, self->rc.rc_ctrl_mode, self->rc.target_bitrate_bits); + GST_INFO_OBJECT (self, "Calculate codedbuf size: %u", base->codedbuf_size); }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/sys/va/gstvavp9enc.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/sys/va/gstvavp9enc.c
Changed
@@ -1768,7 +1768,8 @@ codedbuf_size = codedbuf_size / 2; } - base->codedbuf_size = codedbuf_size; + base->codedbuf_size = gst_va_base_enc_adjust_coded_buffer_size (base, + codedbuf_size, self->rc.rc_ctrl_mode, self->rc.target_bitrate_bits); GST_INFO_OBJECT (self, "Calculate codedbuf size: %u", base->codedbuf_size); } @@ -2560,6 +2561,7 @@ GstBuffer *buf = NULL; gint frame_sizeGST_VP9_MAX_FRAMES_IN_SUPERFRAME = { 0, }; guint num; + gboolean corrupt = FALSE; g_assert ((_enc_frame (last_frame)->flags & FRAME_TYPE_REPEAT) == 0); g_assert ((_enc_frame (last_frame)->flags & FRAME_FLAG_NOT_SHOW) == 0); @@ -2585,10 +2587,16 @@ goto error; } + if (frame_enc->base.picture->corrupt) + corrupt = TRUE; + offset += frame_sizenum; } frame_enc = _enc_frame (last_frame); + /* If any frame is corrupt, make the whole super frame as corrupt. */ + frame_enc->base.picture->corrupt |= corrupt; + frame_sizenum = gst_va_base_enc_copy_output_data (base, frame_enc->base.picture, data + offset, total_sz - offset); if (frame_sizenum <= 0) {
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/tests/check/elements/pnm.c -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/tests/check/elements/pnm.c
Changed
@@ -104,6 +104,59 @@ GST_END_TEST; +/* Push PNM data whose header declares zero dimensions and make sure the + * decoder fails cleanly with a stream error instead of negotiating a + * 0x0 output state (which trips a critical in the video decoder base + * class). P6 fails at the max field, P4 (bitmap) at the height field. */ +GST_START_TEST (test_pnmdec_zero_dimensions) +{ + const gchar *headers = { + "P6\n0 0\n255\n0123456789", + "P4\n0 0\nxx" + }; + gint i; + + for (i = 0; i < G_N_ELEMENTS (headers); i++) { + GstElement *pipeline; + GstElement *src; + GstBus *bus; + GstMessage *msg; + GstFlowReturn ret; + GstBuffer *buf; + + pipeline = gst_parse_launch ("appsrc name=src ! pnmdec ! fakesink", NULL); + fail_unless (pipeline != NULL); + + src = gst_bin_get_by_name (GST_BIN (pipeline), "src"); + bus = gst_element_get_bus (pipeline); + + gst_element_set_state (pipeline, GST_STATE_PLAYING); + + buf = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, + (gpointer) headersi, strlen (headersi), 0, strlen (headersi), + NULL, NULL); + g_signal_emit_by_name (src, "push-buffer", buf, &ret); + gst_buffer_unref (buf); + + /* No critical so far; the check log handler would have failed the + * test already otherwise */ + msg = gst_bus_timed_pop_filtered (bus, 5 * GST_SECOND, + GST_MESSAGE_ERROR | GST_MESSAGE_EOS); + fail_unless (msg != NULL, "no error message for header '%s'", headersi); + fail_unless (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR, + "expected error, got %s for header '%s'", + GST_MESSAGE_TYPE_NAME (msg), headersi); + gst_message_unref (msg); + + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (bus); + gst_object_unref (src); + gst_object_unref (pipeline); + } +} + +GST_END_TEST; + static Suite * pnm_suite (void) { @@ -112,6 +165,7 @@ suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_pnm_enc_dec); + tcase_add_test (tc_chain, test_pnmdec_zero_dimensions); return s; }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/tests/validate/autovideoconvert/renegotiate.validatetest -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/tests/validate/autovideoconvert/renegotiate.validatetest
Changed
@@ -1,22 +1,22 @@ meta, - args = { + args={ "gltestsrc ! gldownload ! autovideoconvert name=convert ! capsfilter name=capsfilter caps=\"video/x-raw(memory:GLMemory)\" ! fakevideosink name=sink", }, - configs = { - "$(validateflow), pad=\"^convert:src$\", record-buffers=true, ignored-fields=\"stream-start={stream-id,group-id,stream},buffer={meta}\"", + configs={ + validateflow, + pad="^convert:src$", + record-buffers=true, + ignored-fields="stream-start={stream-id,group-id,stream},buffer={meta}", } crank-clock, repeat=2 wait, on-clock=true foreach, - caps = < - "video/x-raw", - "video/x-raw(memory:GLMemory)", - "video/x-raw", - >, - actions = { + caps=<"video/x-raw", "video/x-raw(memory:GLMemory)", "video/x-raw">, + actions={ checkpoint, text="Setup capsfilter caps=$(caps)", - set-properties, capsfilter::caps="$(caps)", + set-properties, + capsfilter::caps="$(caps)", crank-clock, repeat=2, wait, on-clock=true, }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/tests/validate/codectimestamper/h264_propagate_caps.validatetest -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/tests/validate/codectimestamper/h264_propagate_caps.validatetest
Changed
@@ -1,9 +1,15 @@ meta, - args = { + args={ "videotestsrc num-buffers=1 ! video/x-raw,width=1920,height=1080,format=I420 ! videoscale ! x264enc tune=zerolatency ! h264timestamper ! video/x-h264,width=50,height=50 ! fakesink name=sink", }, - configs = { - "$(validateflow), pad=sink:sink, buffers-checksum=as-id, caps-properties={width, height}, ignored-event-types={tag}", + configs={ + validateflow, + pad=sink:sink, + buffers-checksum=as-id, + caps-properties={ + width, height, + }, + ignored-event-types={ + tag, + }, } - -
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/tests/validate/opencv/cvtracker.validatetest -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/tests/validate/opencv/cvtracker.validatetest
Changed
@@ -1,8 +1,8 @@ meta, - args = { + args={ "videotestsrc pattern=ball animation-mode=frames num-buffers=90 ! video/x-raw,framerate=30/1,width=320,height=240 ! cvtracker name=tracker object-initial-x=135 object-initial-y=95 object-initial-width=50 object-initial-height=50 algorithm=1 ! videoconvert ! $(videosink) sync=true", }, - configs = { - "$(validateflow), pad=tracker:src, record-buffers=true", + configs={ + validateflow, pad=tracker:src, record-buffers=true, } -crank-clock, repeat=91 \ No newline at end of file +crank-clock, repeat=91
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/tests/validate/testsrcbin/caps_spec.validatetest -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/tests/validate/testsrcbin/caps_spec.validatetest
Changed
@@ -1,7 +1,7 @@ meta, - args = { + args={ "testbin://video,caps=video/x-raw,width=1920,height=1080,num-buffers=1 ! fakesink", }, - configs = { - "$(validateflow), pad=testsrcbin0:video_src_0", + configs={ + validateflow, pad=testsrcbin0:video_src_0, }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/tests/validate/vtenc/vtenc_h264.validatetest -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/tests/validate/vtenc/vtenc_h264.validatetest
Changed
@@ -1,7 +1,7 @@ meta, - args = { + args={ "videotestsrc num-buffers=5 ! video/x-raw,framerate=25/1,width=320,height=240 ! vtenc_h264 name=enc allow-frame-reordering=false ! fakesink", }, - configs = { - "$(validateflow), pad=enc:src, record-buffers=true", + configs={ + validateflow, pad=enc:src, record-buffers=true, }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/tests/validate/vtenc/vtenc_h264_b_frames.validatetest -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/tests/validate/vtenc/vtenc_h264_b_frames.validatetest
Changed
@@ -1,7 +1,7 @@ meta, - args = { + args={ "videotestsrc num-buffers=5 ! video/x-raw,framerate=25/1,width=320,height=240 ! vtenc_h264 name=enc allow-frame-reordering=true ! fakesink", }, - configs = { - "$(validateflow), pad=enc:src, record-buffers=true", + configs={ + validateflow, pad=enc:src, record-buffers=true, }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/tests/validate/vtenc/vtenc_h265.validatetest -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/tests/validate/vtenc/vtenc_h265.validatetest
Changed
@@ -1,7 +1,7 @@ meta, - args = { + args={ "videotestsrc num-buffers=5 ! video/x-raw,framerate=25/1,width=320,height=240 ! vtenc_h264 name=enc allow-frame-reordering=false ! fakesink", }, - configs = { - "$(validateflow), pad=enc:src, record-buffers=true", + configs={ + validateflow, pad=enc:src, record-buffers=true, }
View file
_service:download_files:gst-plugins-bad-1.28.5.tar.xz/tests/validate/vtenc/vtenc_h265_b_frames.validatetest -> _service:download_files:gst-plugins-bad-1.28.7.tar.xz/tests/validate/vtenc/vtenc_h265_b_frames.validatetest
Changed
@@ -1,7 +1,7 @@ meta, - args = { + args={ "videotestsrc num-buffers=5 ! video/x-raw,framerate=25/1,width=320,height=240 ! vtenc_h264 name=enc allow-frame-reordering=true ! fakesink", }, - configs = { - "$(validateflow), pad=enc:src, record-buffers=true", + configs={ + validateflow, pad=enc:src, record-buffers=true, }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.