gstreamer/subprojects
Marek Vasut cc9aa3f80c mpeg2decoder: Fix multiplication wraparound
The GstMpeg2Picture system_frame_number is guint32, constant 1000 is guint32,
GstV4l2CodecMpeg2Dec *_ref_ts multiplication result is u64 .

```
u64 result = (u32)((u32)system_frame_number * (u32)1000);
```
behaves the same as
```
u64 result = (u32)(((u32)system_frame_number * (u32)1000) & 0xffffffff);
```

so in case `system_frame_number > 4294967295 / 1000`, the `result` will
wrap around. Since the `result` is really used as a cookie used to look
up V4L2 buffers related to the currently decoded frame, this wraparound
leads to visible corruption during MPEG2 decoding. At 30 FPS this occurs
after cca. 40 hours of playback .

Fix this by changing the 1000 from u32 to u64, i.e.:
```
u64 result = (u64)((u32)system_frame_number * (u64)1000ULL);
```
this way, the wraparound is prevented and the correct cookie is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5851>
2023-12-21 20:25:29 +01:00
..
gst-devtools Back to development 2023-07-26 18:46:46 +01:00
gst-docs Back to development 2023-07-26 18:46:46 +01:00
gst-editing-services Back to development 2023-07-26 18:46:46 +01:00
gst-examples Back to development 2023-07-26 18:46:46 +01:00
gst-integration-testsuites Back to development 2023-07-26 18:46:46 +01:00
gst-libav Back to development 2023-07-26 18:46:46 +01:00
gst-omx Back to development 2023-07-26 18:46:46 +01:00
gst-plugins-bad mpeg2decoder: Fix multiplication wraparound 2023-12-21 20:25:29 +01:00
gst-plugins-base sdp: fix wrong error message for missing clock-rate in caps 2023-09-07 16:50:31 +01:00
gst-plugins-good Back to development 2023-07-26 18:46:46 +01:00
gst-plugins-ugly Back to development 2023-07-26 18:46:46 +01:00
gst-python Back to development 2023-07-26 18:46:46 +01:00
gst-rtsp-server Back to development 2023-07-26 18:46:46 +01:00
gstreamer Back to development 2023-07-26 18:46:46 +01:00
gstreamer-sharp Back to development 2023-07-26 18:46:46 +01:00
gstreamer-vaapi Back to development 2023-07-26 18:46:46 +01:00
macos-bison-binary macos-bison-binary: Remove warning when running on arm64 2022-12-17 01:28:00 +00:00
packagefiles/pango-1.48.11 harfbuzz.wrap: Fix wrap type, and remove unnecessary patch 2022-07-30 13:10:19 +00:00
win-flex-bison-binaries win-flex-bison: Use gstreamer mirror as primary source 2020-01-18 17:54:48 +05:30
win-nasm win-nasm: Use gstreamer mirror as primary source 2020-01-18 17:54:48 +05:30
avtp.wrap Revert "Revert "Add libavtp wrap file"" 2020-06-30 15:47:18 -07:00
bindinator.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
cairo.wrap meson: Build cairo subproject when unavailable on the system 2022-01-21 06:34:33 +00:00
dav1d.wrap Add dav1d wrap file 2020-05-02 09:55:12 +00:00
dssim.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
dv.wrap subprojects: add libdv wrap 2021-01-14 19:16:01 +00:00
expat.wrap meson: Update expat.wrap for MSVC fix 2020-11-05 13:09:46 +05:30
fdk-aac.wrap subprojects: fdk-aac: add fallback_url 2021-10-28 23:29:27 +00:00
FFmpeg.wrap FFmpeg.wrap: Fix to the 4.4.2 stable release 2022-10-23 23:40:02 +00:00
fontconfig.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
freetype2.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
fribidi.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
gl-headers.wrap Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir 2021-09-24 16:13:26 -03:00
glib-networking.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
glib.wrap meson: Update subprojects to fix warnings 2022-01-25 14:25:19 +05:30
graphene.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
gst-plugins-rs.wrap subprojects: Switch gst-plugins-rs.wrap to the 0.8 branch for 1.20 2022-02-20 14:25:40 +00:00
gtk-sharp.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
harfbuzz.wrap harfbuzz.wrap: Fix wrap type, and remove unnecessary patch 2022-07-30 13:10:19 +00:00
json-glib.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
lame.wrap subprojects/lame: Update to latest wrap 2022-01-28 02:01:39 +05:30
libdrm.wrap meson: Update subprojects to fix warnings 2022-01-25 14:25:19 +05:30
libffi.wrap subprojects: libffi: pin to meson-3.2.9999.4 tag 2023-01-02 00:35:56 +00:00
libjpeg-turbo.wrap subprojects: Bump libjpeg-turbo version to 2.1.0-2 for x86 MSVC build 2021-08-04 19:22:30 +09:00
libmicrodns.wrap subprojects: libmicrodns: pin to 0.1.2 release 2020-07-07 15:23:29 +01:00
libnice.wrap subprojects: Update libnice to 0.1.19 2022-05-04 14:04:09 +01:00
libopenjp2.wrap wrap: libopenjp2: use patch version 7 2021-10-22 19:47:27 +00:00
libpng.wrap subprojects/libpng: Update to latest wrap file 2022-01-28 02:01:39 +05:30
libpsl.wrap libpsl.wrap: pin to 0.21.1 tag 2020-10-26 12:13:12 +00:00
libsoup.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
libwpe.wrap subprojects: Update libwpe and wpebackend-fdo for fallback support 2020-10-12 12:29:01 +00:00
libxml2.wrap libxml2: update wrap path to 2.9.7-6 2020-02-19 13:45:52 +01:00
ogg.wrap meson: Update ogg.wrap from wrapdb 2022-07-31 14:33:59 +01:00
openh264.wrap openh264: update to v2.1.1 2020-05-31 11:11:18 +01:00
opus.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
orc.wrap build: Fix some compiler warnings by upgrading wraps 2022-07-31 14:32:41 +01:00
pango.wrap meson: Fix compile failures on macOS in harfbuzz and pango 2022-07-16 10:54:14 +02:00
pixman.wrap meson: Update subprojects to fix warnings 2022-01-25 14:25:19 +05:30
proxy-libintl.wrap subprojects: proxy-libintl: fix push-url 2019-08-14 18:51:43 +01:00
pycairo.wrap {pygobject,pycairo}.wrap: point to stable refs 2020-09-15 15:51:42 +03:00
pygobject.wrap build: Fix some compiler warnings by upgrading wraps 2022-07-31 14:32:41 +01:00
sqlite3.wrap Update to sqlite3 from wrapdb 2021-08-24 20:52:06 +00:00
vorbis.wrap subprojects: Update ogg and vorbis wraps 2021-10-19 17:42:21 +00:00
webrtc-audio-processing.wrap Pin all wrap files to closest tag or commit sha1 2021-10-14 22:34:49 +00:00
wpebackend-fdo.wrap subprojects: Update libwpe and wpebackend-fdo for fallback support 2020-10-12 12:29:01 +00:00
x264.wrap x264: update to latest stable 160.3011 2020-07-30 15:52:38 +01:00
zlib.wrap meson: Update zlib.wrap to use wrapdb instead of github fork 2021-01-13 12:55:06 +00:00