gstreamer merge requestshttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests2024-03-28T13:38:44Zhttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6451v4l2src: need maintain the caps order in caps compare when fixate2024-03-28T13:38:44ZHaihua Huv4l2src: need maintain the caps order in caps compare when fixateif the calculated "distance" of caps A and B from the preference are equal, need to keep the original order instead of swap them.
eg, when run below cmdline
```
gst-launch-1.0 v4l2src device=/dev/video3 ! videoconvert ! video/x-raw,form...if the calculated "distance" of caps A and B from the preference are equal, need to keep the original order instead of swap them.
eg, when run below cmdline
```
gst-launch-1.0 v4l2src device=/dev/video3 ! videoconvert ! video/x-raw,format=YUY2,width=1920,height=1080 ! videoconvert ! waylandsink
```
User want to use yuy2 instead NV16 as v4l2src's output, but the actual result is NV16 is placed in the first place
```
0:00:00.642391213 17684 0xffff7c000b70 DEBUG v4l2src gstv4l2src.c:535:gst_v4l2src_fixate:<v4l2src0> Preferred size 1920x1080
0:00:00.642556591 17684 0xffff7c000b70 TRACE v4l2src gstv4l2src.c:478:gst_v4l2src_fixed_caps_compare: Placing video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV12, pixel-aspect-ratio=(fraction)1/1 before video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, pixel-aspect-ratio=(fraction)1/1
0:00:00.642671469 17684 0xffff7c000b70 TRACE v4l2src gstv4l2src.c:478:gst_v4l2src_fixed_caps_compare: Placing video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV16, pixel-aspect-ratio=(fraction)1/1 before video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV12, pixel-aspect-ratio=(fraction)1/1
0:00:00.642779221 17684 0xffff7c000b70 DEBUG v4l2src gstv4l2src.c:558:gst_v4l2src_fixate:<v4l2src0> sorted and normalized caps video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV16, pixel-aspect-ratio=(fraction)1/1; video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV12, pixel-aspect-ratio=(fraction)1/1; video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, pixel-aspect-ratio=(fraction)1/1
0:00:00.665755453 17684 0xffff7c000b70 DEBUG v4l2src gstv4l2src.c:617:gst_v4l2src_fixate:<v4l2src0> fixated caps video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV16, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
```1.25.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6468meson: d3d11: Disable library build if DirectXMath header was not found2024-03-28T12:38:44ZSeungha Yangseungha@centricular.commeson: d3d11: Disable library build if DirectXMath header was not foundDirectXMath header library is a hard dependencyDirectXMath header library is a hard dependency1.25.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6226rtspsrc: Increase rank to PRIMARY for autoplug purposes2024-02-27T15:41:51ZNirbheek Chauhannirbheek.chauhan@gmail.comrtspsrc: Increase rank to PRIMARY for autoplug purposesThis affects autoplug by gst_element_make_from_uri() in, for example,
uridecodebin. The element should've already been PRIMARY rank, but it
was NONE because gst_element_make_from_uri() doesn't ignore NONE rank
elements when searching for...This affects autoplug by gst_element_make_from_uri() in, for example,
uridecodebin. The element should've already been PRIMARY rank, but it
was NONE because gst_element_make_from_uri() doesn't ignore NONE rank
elements when searching for element factories, unlike decodebin.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/5021.24.0GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5770gstdtlscertificate: Define _WINSOCKAPI_ before including windows.h2023-12-08T10:19:29ZAlessandro Bonogstdtlscertificate: Define _WINSOCKAPI_ before including windows.hThis avoid a build failure when compiling against OpenSSL 3.2.0. The
problem is when windows.h is included before WinSock2.h. Because
windows.h includes winsock.h[1]. Defining _WINSOCKAPI_ stops windows.h
including winsock.h.
Error:
```...This avoid a build failure when compiling against OpenSSL 3.2.0. The
problem is when windows.h is included before WinSock2.h. Because
windows.h includes winsock.h[1]. Defining _WINSOCKAPI_ stops windows.h
including winsock.h.
Error:
```
[748/1041] Compiling C object ext/dtls/gstdtls.dll.p/gstdtlscertificate.c.obj
FAILED: ext/dtls/gstdtls.dll.p/gstdtlscertificate.c.obj
[...]
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared\ws2def.h(235): error C2011: 'sockaddr': 'struct' type redefinition
C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um\winsock.h(482): note: see declaration of 'sockaddr'
```
[1] https://stackoverflow.com/a/1372836
Closes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/31671.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5743qtdemux: Don't overflow sample index2023-12-01T17:47:29ZHosang Leeqtdemux: Don't overflow sample indexDon't reduce sample index if it is already at 0.
Assigning -1 to a guint32 variable causes unexpected behavior.
Due to the large stream->to_sample value, audio samples are advanced until the end unexpectedly during reverse playback.Don't reduce sample index if it is already at 0.
Assigning -1 to a guint32 variable causes unexpected behavior.
Due to the large stream->to_sample value, audio samples are advanced until the end unexpectedly during reverse playback.1.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5742qtdemux: Fix reverse playback for pcm audio stream2023-12-01T17:48:04ZHosang Leeqtdemux: Fix reverse playback for pcm audio streamSome raw lpcm or adpcm may have larger sample sizes than the max
buffer size value set.
Trimming the buffer causes bogus size error on reverse playback.
Example adpcm audio stream.
```
0:00:00.049765219 112786 0x7fccd0000eb0 LOG ...Some raw lpcm or adpcm may have larger sample sizes than the max
buffer size value set.
Trimming the buffer causes bogus size error on reverse playback.
Example adpcm audio stream.
```
0:00:00.049765219 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:11851:qtdemux_parse_trak:<qtdemux0> track subtype: soun
0:00:00.049767609 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:11908:qtdemux_parse_trak:<qtdemux0> stsd len: 68
0:00:00.049771956 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:11909:qtdemux_parse_trak:<qtdemux0> stsd entry count: 1
0:00:00.049774504 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:11924:qtdemux_parse_trak:<qtdemux0> stsd type: ima4
0:00:00.049776464 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:11926:qtdemux_parse_trak:<qtdemux0> stsd type len: 52
0:00:00.049778650 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13080:qtdemux_parse_trak:<qtdemux0> version/rev: 00010000
0:00:00.049780583 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13081:qtdemux_parse_trak:<qtdemux0> vendor: 00000000
0:00:00.049782516 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13083:qtdemux_parse_trak:<qtdemux0> n_channels: 1
0:00:00.049784432 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13084:qtdemux_parse_trak:<qtdemux0> sample_size: 16
0:00:00.049786441 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13085:qtdemux_parse_trak:<qtdemux0> compression_id: 0
0:00:00.049788313 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13086:qtdemux_parse_trak:<qtdemux0> packet size: 0
0:00:00.049790928 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13088:qtdemux_parse_trak:<qtdemux0> sample rate: 22050
0:00:00.049792991 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13113:qtdemux_parse_trak:<qtdemux0> Sound sample description Version 1
0:00:00.049795027 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13114:qtdemux_parse_trak:<qtdemux0> samples/packet: 64
0:00:00.049796999 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13116:qtdemux_parse_trak:<qtdemux0> bytes/packet: 34
0:00:00.049798830 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13118:qtdemux_parse_trak:<qtdemux0> bytes/frame: 34
0:00:00.049800667 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13120:qtdemux_parse_trak:<qtdemux0> bytes/sample: 2
0:00:00.049802601 112786 0x7fccd0000eb0 LOG qtdemux qtdemux.c:13126:qtdemux_parse_trak:<qtdemux0> samples/frame: 64
0:00:00.049811274 112786 0x7fccd0000eb0 INFO qtdemux qtdemux.c:13957:qtdemux_parse_trak:<qtdemux0> unhandled type ima4
0:00:00.049815283 112786 0x7fccd0000eb0 INFO qtdemux qtdemux.c:13962:qtdemux_parse_trak:<qtdemux0> type ima4 caps audio/x-adpcm, layout=(string)quicktime
```
```
0:00:01.855474825 171664 0x7fbca8034a40 DEBUG qtdemux qtdemux.c:5537:gst_qtdemux_stream_update_segment:<qtdemux0:audio_0> New segment: time segment start=0:00:00.000000000, offset=0:00:00.000000000, stop=0:00:01.560000000, rate=-1.000000, applied_rate=1.000000, flags=0x01, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:01.855927786 171664 0x7fbca8034a40 DEBUG qtdemux qtdemux.c:7140:gst_qtdemux_loop_state_movie:<qtdemux0> size 22050 larger than stream max_buffer_size 8192, trimming
0:00:01.856026989 171664 0x7fbca8034a40 DEBUG qtdemux qtdemux.c:7140:gst_qtdemux_loop_state_movie:<qtdemux0> size 22050 larger than stream max_buffer_size 8192, trimming
0:00:01.856088429 171664 0x7fbca8034a40 WARN qtdemux qtdemux.c:558:gst_qtdemux_pull_atom:<qtdemux0> error: This file is invalid and cannot be played.
0:00:01.856092631 171664 0x7fbca8034a40 WARN qtdemux qtdemux.c:558:gst_qtdemux_pull_atom:<qtdemux0> error: atom has bogus size 4292411360
```1.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5702codecparsers: av1: Clip max tile rows and cols values2023-11-29T17:05:02ZBenjamin Gaignardcodecparsers: av1: Clip max tile rows and cols valuesRevert the previous and propose a new solution which doesn't break 8K av1 streams.Revert the previous and propose a new solution which doesn't break 8K av1 streams.1.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5718baseparse: Fixes to buffers extracted from adapter2023-11-27T15:23:28ZJan Alexander Steffensbaseparse: Fixes to buffers extracted from adapter- **baseparse: Add missing `gst_buffer_make_writable`**
When the subclass attempts to finish without an explicit `out_buffer`,
we take a buffer from our adapter. We need to make this buffer writable
before copying the metadata....- **baseparse: Add missing `gst_buffer_make_writable`**
When the subclass attempts to finish without an explicit `out_buffer`,
we take a buffer from our adapter. We need to make this buffer writable
before copying the metadata.
This led to data races such as in the following pipeline, which randomly
messed up the buffer PTS:
gst-launch-1.0 -e audiotestsrc timestamp-offset=5555 num-buffers=100 \
! opusenc ! tee name=t ! queue ! opusparse ! fakesink silent=0 \
t. ! queue ! opusparse ! fakesink silent=0 -v | grep '0000, dur'
- **baseparse: Reset metadata for reverse playback fragment buffers**
Don't let the adapter leak uncontrollable values.1.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5635mxfdemux: Store GstMXFDemuxEssenceTrack in their own fixed allocation2023-11-10T15:37:01ZTim-Philipp Müllertim@centricular.commxfdemux: Store GstMXFDemuxEssenceTrack in their own fixed allocationPreviously they were stored inline inside a GArray, but as references to
the tracks were stored in various other places although the array could
still be updated (and reallocated!), this could lead to dangling
references in various place...Previously they were stored inline inside a GArray, but as references to
the tracks were stored in various other places although the array could
still be updated (and reallocated!), this could lead to dangling
references in various places.
Instead now store them in a GPtrArray in their own allocation so each
track's memory position stays fixed.1.23.1https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5634codecparsers: av1: Clip max tile rows and cols values2023-11-23T15:37:47ZTim-Philipp Müllertim@centricular.comcodecparsers: av1: Clip max tile rows and cols valuesClip tile rows and cols to 64 as describe in AV1 specification.Clip tile rows and cols to 64 as describe in AV1 specification.1.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5598v4l2codecs: Avoid QBUF/DQBUF struct timeval .tv_usec wrap-around at frame 100...2023-11-04T16:59:57ZMarek Vasutv4l2codecs: Avoid QBUF/DQBUF struct timeval .tv_usec wrap-around at frame 1000000When decoding stream using hardware V4L2 decoder element, in any of the
currently supported formats, the decoding will fail once frame number
1000000 is reached. The reported error clearly indicates a wrap-around
occured, instead of rece...When decoding stream using hardware V4L2 decoder element, in any of the
currently supported formats, the decoding will fail once frame number
1000000 is reached. The reported error clearly indicates a wrap-around
occured, instead of receiving decoded frame 1000000, frame 0 is received
from the hardware V4L2 decoder driver.
The problem is actually not in the driver itself, but rather in gstreamer,
which uses `struct v4l2_buffer` member `.timestamp` in a special way. The
timestamp of buffers with encoded data added to the SINK (input) queue of
the driver is copied by the driver into matching buffers with decoded data
added to the SOURCE (output) queue of the driver. In fact, the timestamp
is not a timestamp at all, but rather in this special case, only part of
it is used as an incrementing frame counter.
The `.timestamp` is of type `struct timeval`, which is defined in
`sys/time.h` [1]. Only the `tv_usec` member of this structure is used
for the incrementing frame counter. However, suseconds_t tv_usec [2]
may be limited to range [-1, 1000000]:
```
[XSI] The type suseconds_t shall be a signed integer type capable of
storing values at least in the range [-1, 1000000]. [Option End]
```
Therefore, once frame 1000000 is reached, a rollover occurs and decoding
fails.
Fix this by using both `struct timeval` members, `.tv_sec` and `.tv_usec`
with matching modular arithmetic, this way the failure would occur again
just short of 2^84 frames, which should be plenty.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_time.h.html
[2] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html1.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5595wavparse: fix buffer leak with adtl tag2023-11-04T00:06:13ZTim-Philipp Müllertim@centricular.comwavparse: fix buffer leak with adtl tagFixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3020
cc @johanadamnilsson
New MR since the old one was jinxed for some reason (current theory: long username plus long gstreamer repo name made it exceed some path lim...Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3020
cc @johanadamnilsson
New MR since the old one was jinxed for some reason (current theory: long username plus long gstreamer repo name made it exceed some path limit, but then it worked on x86, so who knows).1.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5573libde265: Do not decode the non 4:2:0 8 bits format2023-11-19T12:10:17ZHe Junyanlibde265: Do not decode the non 4:2:0 8 bits formatFix the decoder crash problem because the libde265dec only support I420 format now.Fix the decoder crash problem because the libde265dec only support I420 format now.1.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5420flacenc: Correctly handle up to 255 cue entries2023-10-04T18:06:57ZSebastian Drögeflacenc: Correctly handle up to 255 cue entriesThe counter was using a signed 8 bit integer, which was overflowing
after 127 entries. That was then passed as an unsigned 32 bit integer to
libflac, which caused it to be converted to a huge unsigned number.
That then caused an invalid ...The counter was using a signed 8 bit integer, which was overflowing
after 127 entries. That was then passed as an unsigned 32 bit integer to
libflac, which caused it to be converted to a huge unsigned number.
That then caused an invalid memory access inside libflac.
As a bonus, signed integer overflow is undefined behaviour.
Instead, use an unsigned 8 bit integer. Once this overflows the existing
code already catches it and stops adding the cue. While FLAC__metadata_object_cuesheet_insert_track()
takes an unsigned 32 bit integer for the track number, FLAC__StreamMetadata_CueSheet_Track is
limiting it to an unsigned 8 bit integer.
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/29211.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5349pulsedeviceprovider: fix incorrect usage of GST_ELEMENT_ERROR2023-10-02T14:40:16ZOlivier Blinpulsedeviceprovider: fix incorrect usage of GST_ELEMENT_ERRORThe provider is not a GStreamer element.The provider is not a GStreamer element.1.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5282androidmedia: fix hevc codec profile registration2023-10-02T14:40:14ZThomas Schneiderandroidmedia: fix hevc codec profile registrationFix the codec registration logic such that all supported profiles are available instead of just the first in the list.
Fixes regression introduced in https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2511
This was tes...Fix the codec registration logic such that all supported profiles are available instead of just the first in the list.
Fixes regression introduced in https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2511
This was tested on a Samsung S8 lite tablet. Without the fix only the main-10 profile is available, with the patch both the main/main-1- profiles are usable.
Might be related: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/15831.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5266ci: Update ci-templates ref2023-09-17T17:26:40ZJordan Petridіsci: Update ci-templates refNeeded primarily for the fix in:
https://gitlab.freedesktop.org/freedesktop/ci-templates/-/merge_requests/188Needed primarily for the fix in:
https://gitlab.freedesktop.org/freedesktop/ci-templates/-/merge_requests/1881.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4858kmssink: Add STM32 LTDC and NXP i.MX8M Plus LCDIFv3 auto-detection2023-11-04T15:06:10ZMarek Vasutkmssink: Add STM32 LTDC and NXP i.MX8M Plus LCDIFv3 auto-detectionAdd STM32 LTDC controller into list of auto-detected modules.
Add i.MX8M Plus LCDIFv3 controller into list of auto-detected modules.Add STM32 LTDC controller into list of auto-detected modules.
Add i.MX8M Plus LCDIFv3 controller into list of auto-detected modules.1.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3693zxing: add support for zxing-c++ 2.02023-12-29T11:44:42ZAntonio Rojaszxing: add support for zxing-c++ 2.0format is a C++ string in 2.0format is a C++ string in 2.01.23.1GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6446vtdec: Improve error handling in edge cases2024-03-28T14:11:38ZPiotr Brzezińskivtdec: Improve error handling in edge casesFixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3425
Just ignoring these kinds of errors seems to be enough, as the faulty frame is (from my testing) always flagged to be skipped anyway. The decoding session does not s...Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3425
Just ignoring these kinds of errors seems to be enough, as the faulty frame is (from my testing) always flagged to be skipped anyway. The decoding session does not seem to need to be recreated or anything like that.
Also fixes vtdec being too trigger happy about aborting when an error-flagged frame appears.
```
vtdec: Handle some errors without stopping the decoder
ReferenceMissingErr is not critical and the simplest solution is to just ignore it. The frame has
the FrameDropped flag set when it occurs, so we can just drop it as usual.
BadDataErr is also not immediately critical, but in its case let's set the ERROR flag,
so the output loop can use GST_VIDEO_DECODER_ERROR to count and error out if it happens too many times.
```
```
vtdec: Use GST_VIDEO_DECODER_ERROR instead of aborting when frame has an ERROR flag
This was already being used in handle_frame() for errors that happen when queueing a frame for decoding,
let's do the same when a frame is flagged with an error in the output callback.
From quick testing, this makes seeking more reliable (previously, it would sometimes cause a decoding error
and shut the whole decoder down due to GST_FLOW_ERROR).
```