Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gstreamer-plugins-libav for openSUSE:Factory checked in at 2023-03-12 16:22:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gstreamer-plugins-libav (Old) and /work/SRC/openSUSE:Factory/.gstreamer-plugins-libav.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gstreamer-plugins-libav" Sun Mar 12 16:22:31 2023 rev:39 rq:1070790 version:1.22.1 Changes: -------- --- /work/SRC/openSUSE:Factory/gstreamer-plugins-libav/gstreamer-plugins-libav.changes 2023-03-02 23:02:00.070756402 +0100 +++ /work/SRC/openSUSE:Factory/.gstreamer-plugins-libav.new.31432/gstreamer-plugins-libav.changes 2023-03-12 16:22:36.784333321 +0100 @@ -1,0 +2,15 @@ +Thu Mar 9 18:13:20 UTC 2023 - Bjørn Lie <bjorn....@gmail.com> + +- Update to version 1.22.1: + + avauddec, avviddec: Free packet side data after usage + + avviddec: + - Change AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS + to fix build against newer ffmpeg versions + - Don't take ffmpeg timestamps verbatim but only use them to + calculate DTS + + Memory leak in 'av_packet_add_side_data' in + /lib/x86_64-linux-gnu/libavcodec.so reading the file + clock_odd_size_RLE_g1597902.avi +- Rebase patch with quilt. + +------------------------------------------------------------------- Old: ---- gst-libav-1.22.0.tar.xz New: ---- gst-libav-1.22.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gstreamer-plugins-libav.spec ++++++ --- /var/tmp/diff_new_pack.gCjyEI/_old 2023-03-12 16:22:37.260335417 +0100 +++ /var/tmp/diff_new_pack.gCjyEI/_new 2023-03-12 16:22:37.264335435 +0100 @@ -19,7 +19,7 @@ %define gst_branch 1.0 Name: gstreamer-plugins-libav -Version: 1.22.0 +Version: 1.22.1 Release: 0 Summary: A ffmpeg/libav plugin for GStreamer License: LGPL-2.1-or-later ++++++ gst-libav-1.22.0.tar.xz -> gst-libav-1.22.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-libav-1.22.0/ChangeLog new/gst-libav-1.22.1/ChangeLog --- old/gst-libav-1.22.0/ChangeLog 2023-01-23 20:35:19.864207000 +0100 +++ new/gst-libav-1.22.1/ChangeLog 2023-03-04 14:48:03.625562400 +0100 @@ -1,3 +1,63 @@ +=== release 1.22.1 === + +2023-03-04 13:42:32 +0000 Tim-Philipp Müller <t...@centricular.com> + + * NEWS: + * RELEASE: + * gst-libav.doap: + * meson.build: + Release 1.22.1 + +2023-02-28 14:00:26 +0200 Sebastian Dröge <sebast...@centricular.com> + + * ext/libav/gstavauddec.c: + * ext/libav/gstavviddec.c: + ffmpeg: avauddec/avviddec: Free packet side data after usage + As we don't use proper refcounting with AVPacket we have to manage this + ourselves. + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2006 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4078> + +2023-02-13 17:02:01 -0500 U. Artie Eoff <ullysses.a.e...@intel.com> + + * ext/libav/gstavviddec.c: + avviddec: change AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS + This fixes a compile error with recent upstream FFmpeg. + The AV_CODEC_CAP_AUTO_THREADS was deprecated and renamed to + AV_CODEC_CAP_OTHER_THREADS in FFmpeg upstream commit + 7d09579190de (lavc 58.132.100). + The AV_CODEC_CAP_AUTO_THREADS was finally removed in FFmpeg upstream + commit 10c9a0874cb3 (lavc 59.63.100). + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3964> + +2023-01-24 15:38:20 +0200 Sebastian Dröge <sebast...@centricular.com> + + * ext/libav/gstavvidenc.c: + avvidenc: Don't take ffmpeg timestamps verbatim but only use them to calculate DTS + The ffmpeg timestamps are inaccurate and only in framerate granularity. + To avoid generating inaccurate output timestamps, especially with + variable framerate streams, only use the ffmpeg timestamps for + calculating the DTS. + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1544 + again. + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3808> + +2023-01-24 15:28:17 +0200 Sebastian Dröge <sebast...@centricular.com> + + * ext/libav/gstavcodecmap.c: + * ext/libav/gstavvidenc.c: + Revert "avvidenc: Set timebase in the ffmpeg context to nanoseconds and set framerate" + This reverts commit 50db59449e9cdb637c5f0c1b7c5dccd582fac4ee. + This broke the MPEG-1 video encoder as it requires the framerate to be + used for the timebase. + Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1734 + Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3808> + +2023-01-25 16:46:42 +0000 Tim-Philipp Müller <t...@centricular.com> + + * meson.build: + Back to development + === release 1.22.0 === 2023-01-23 19:29:34 +0000 Tim-Philipp Müller <t...@centricular.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-libav-1.22.0/NEWS new/gst-libav-1.22.1/NEWS --- old/gst-libav-1.22.0/NEWS 2023-01-23 20:29:34.000000000 +0100 +++ new/gst-libav-1.22.1/NEWS 2023-03-04 14:42:32.000000000 +0100 @@ -2,10 +2,13 @@ GStreamer 1.22.0 was originally released on 23 January 2023. +The latest bug-fix release in the stable 1.22 series is 1.22.1 and was +released on 04 March 2023. + See https://gstreamer.freedesktop.org/releases/1.22/ for the latest version of this document. -Last updated: Monday 23 January 2023, 17:00 UTC (log) +Last updated: Monday 04 March 2023, 13:00 UTC (log) Introduction @@ -298,8 +301,8 @@ - This is enabled by setting the instant-uri property to true, setting the URI to switch to immediately, and then disabling the instant-uri property again afterwards. -- playbin3, decodebin3, uridecodebin3, parsebin, and urisrc are no - longer experimental +- playbin3, decodebin3, uridecodebin3, parsebin, and urisourcebin are + no longer experimental - They were originally marked as âtechnology previewâ but have since seen extensive usage in production settings, so are considered ready for general use now. @@ -819,9 +822,9 @@ New MP4 muxer + Fragmented MP4 muxer -- fmp4mux: New fragmented MP4/ISOBMFF/CMAF muxer for generating - e.g. DASH/HLS media fragments. -- isomp4mux: New non-fragmented, normal MP4 muxer. +- isofmp4mux, cmafmux, dashmp4mux, onviffmp4mux: New fragmented + MP4/ISOBMFF/CMAF muxer for generating e.g. DASH/HLS media fragments. +- isomp4mux, onvifmp4mux: New non-fragmented, normal MP4 muxer. Both plugins provides elements that replace the existing qtmux/mp4mux element from gst-plugins-good. While not feature-equivalent yet, the new @@ -1217,6 +1220,240 @@ 1.22.0 was originally released on 23 January 2023. +1.22.1 + +The first 1.22 bug-fix release (1.22.1) was released on 04 March 2023. + +This release only contains bugfixes and it should be safe to update from +1.22.0. + +Highlighted bugfixes in 1.22.1 + +- audio channel-mix: allow up to 64 channels (instead of up to 63 + channels) +- avfvideosrc: Donât wait on main thread for permissions request +- avvidenc: avoid generating inaccurate output timestamps, especially + with variable framerate streams +- AV1 video codec caps signalling improvements in various elements +- codectimestamper: Fix timestamping on sequence update +- d3d11overlaycompositor: fix texture width and height +- d3d11videosink: Fix rendering on external handle +- dashdemux2: fix seek operation taking a log time to finish for some + streams +- nvencoder: Fix B-frame encoding on Linux and min buffers in auto GPU + mode +- playbin3: fixing buffering for live pipelines +- playbin: fix potential deadlock when stopping stream with subtitles + visible +- redenc: fix setting of extension ID for twcc +- rtspsrc: improved compatibility with more broken RTSP servers +- v4l2h264dec: Fix Raspberry Pi4 will not play video in application +- vtdec: fix jittery playback of H.264 Level 4.1 movies in macOS +- vtdec: Fix non-deterministic frame output after flushing seeks +- vtenc: fix handling of interlaced ProRes on Apple M1 hardware +- vtenc: donât advertise ARGB/RGBA64 input caps on M1 Pro/Max with + macOS <13 +- wasapi2src: Fix loopback capture on Windows 10 Anniversary Update +- tools: better handling of non-ASCII command line arguments on + Windows +- gst-libav: fix build against newer ffmpeg versions +- gst-python: Use arch-specific install dir for gi overrides +- cerbero: Fix setuptools site.py breakage in Python 3.11 +- macOS packages: Fix broken binaries on macos < 11.0 +- various bug fixes, memory leak fixes, and other stability and + reliability improvements + +gstreamer + +- buffer: fix copy meta reference debug log formatting +- bin: Donât unlock unlocked mutex in gst_bin_remove_func() +- pad: Donât leak user_data in gst_pad_start_task() +- aggregator: Always lock aggpad around update_time_level +- inputselector: Avoid potential deadlock when shutting down, + e.g. playbin with subtitles +- multiqueue: Handle use-interleave latency live pipelines, fixing + buffering for live pipelines in playbin3 +- GstBaseSrc: fix transfer annotation for fixate() virtual method +- GstBaseSrc, GstPushSrc: add nullable annotations to virtual methods +- tools: Make sure UTF-8 encoded command line arguments on Windows + +gst-plugins-base + +- alsasink: Fix stall when going from PLAYING to NULL (stucked at + PAUSED) with uac1 gadget +- appsrc: Donât chain up BaseSrc::negotiate() +- audio: channel-mix: Fix channel count limit to be able to equal 64 +- gldisplay: Mark gst_gl_display_create_context() other_context + parameter as nullable +- gldisplay: Remove unused code +- gstglwindow_x11.c: Fix colormap leak +- gl/cocoa: Return a strong ref to the parent GstGLContext +- rtspconnection: Annotate RTSP message and RTSP events parameters + correctly +- sdp, typefind: Fix some annotations +- sdp: gstmikey: gst_mikey_message_to_caps: extract ROC from first + crypto session +- subparse: Properly forward segment seqnum +- uridecodebin: Set source element to READY before querying it +- uritranscodebin: Fix unref of NULL +- gst-play-1.0: Donât force accurate seeking + +gst-plugins-good + +- adaptivedemux2: Fix buffering threshold initialization +- dashdemux2: the seek operation takes a log time to finish for some + streams +- glvideomixer: Keep a reference to the underlying pad +- qtdemux: Donât emit GstSegment correcting start time when in MSE + mode +- qtdemux: Handle moov atom length=0 case by reading until the end +- qtdemux, qtmux: Drop av1C version 0 parsing and implement version 1 + parsing/writing +- qtmux: Fix assertion on caps update +- redenc: fix setting of extension ID for twcc +- rtspsrc: Use the correct vfunc for the push-backchannel-sample + action signal +- rtpssrcdemux: set different stream-id on each src pad +- udpsrc: GstSocketTimestampMessage only for SCM_TIMESTAMPNS +- v4l2h264dec: Fix Raspberry Pi4 will not play video in application + +gst-plugins-bad + +- aom: Include stream-format and alignment in the AV1 caps +- av1parser, h265parser: Fix some code defects +- av1parser: Donât consider unknown metadata OBUs a bitstream error +- avfvideosrc: Donât wait on main thread for permissions request +- ccconverter: donât debug a potentially freed filter caps +- codectimestamper: Fix timestamping on sequence update +- codecparsers: {h264, h265}bitwriter: Remove redundant condition + checks +- codecs: decoders: fail early if no input caps have been provided for + all new decoder base classes +- closedcaption: Donât leak caps event +- curlhttpsrc: Add curl anyauth option +- d3d11overlaycompositor: fix texture width and height +- d3d11videosink: Fix rendering on external handle +- h265parse: Always set profile on src caps +- msdkav1enc: fix the category for msdkav1enc debug +- nvcodec: improve error reporting on plugin init +- nvencoder: Fix b-frame encoding on Linux +- nvencoder: Fix min buffers parameter of allocation query in auto GPU + mode +- nvvp9dec: Fix return value +- qsvav1enc, amfav1enc: Set stream-format on caps +- vtdec: Jittery playback of H.264 Level 4.1 movies in macOS (both + x86_64 and arm64) +- vtdec: Fix DPB size calculations not taking values from SPS into + account +- vtdec: Fix not waiting for async frames when flushing +- vtenc: Disable ARGB/RGBA64 caps on M1 Pro/Max with macOS <13 +- vtenc: Fix checking for certain CPU variants when running in VMs +- vtenc: Disable HW acceleration for interlaced ProRes +- va: Avoid the array index overflow when filling 8x8 scaling list. +- va: Fix some code defects +- vah265enc: Use helper to update properties. +- vulkan: memory: Flush non coherent memory after write. +- wasapi2src: Fix loopback capture on Windows 10 Anniversary Update +- webrtcbin: small stats improvements +- win32ipcutils: Add missing include +- wpe: Logging fixes for the WebExtension + +gst-plugins-ugly + +- mpegpsdemux: Ignore DTS if PTS < DTS + +gst-libav + +- avauddec, avviddec: Free packet side data after usage +- avviddec: change + AV_CODEC_CAP_AUTO_THREADS->AV_CODEC_CAP_OTHER_THREADS to fix build + against newer ffmpeg versions +- Memory leak in â av_packet_add_side_dataâ in + /lib/x86_64-linux-gnu/libavcodec.so reading the file + clock_odd_size_RLE_g1597902.avi +- avvidenc: Donât take ffmpeg timestamps verbatim but only use them to + calculate DTS + +gst-rtsp-server + +- No changes + +gstreamer-vaapi + +- vaapi: Skip plugin pc file for shared plugins + +gstreamer-sharp + +- No changes + +gst-omx + +- No changes + +gst-python + +- gst-python: Use arch-specific install dir for gi overrides + +gst-editing-services + +- No changes + +gst-validate + gst-integration-testsuites + +- validate:scenario: sink refs when building +- tests: Fix known issue definition location for unit tests and how we + handle them in validate launcher +- tests: mark elements_srtp.test_play test as flaky +- Fix gstreamer-validate-1.0 dependency name +- validate-scenario: fix g-i warning in annotation +- validate: Fix gst_validate_execute_action annotation + +gst-examples + +- webrtc examples: Use webrtc.gstreamer.net +- webrtc_sendrecv.py: Various fixes + +Development build environment + +- gst-env: Handle installing python modules to dist-packages +- meson: Allow sysdeps to be forced as fallback subprojects +- meson: Switch dav1d wrap to a tarball and update to dav1d 1.1.0 + +Cerbero build tool and packaging changes in 1.22.1 + +- macos: Fix broken binaries on macos < 11.0 +- orc: Update pthread_jit_write_protect fix for macOS/iOS +- dav1d: Update to 1.1.0 +- libsrtp: update to v2.5.0 +- rustup: Update to 1.25.2 +- rust: Update to 1.67; cargo-c to 0.9.16 +- cerbero: Donât error out if bindir already exists +- Fix setuptools site.py breakage in Python 3.11, bump + gobject-introspection, bump windows image +- cerbero: Retry if cargo update fails on macOS +- gst-plugins-rs: Build glib/gio bindings with 2.74 API support + +Contributors to 1.22.1 + +Alessandro Bono, Arun Raghavan, Bart Van Severen, Carlos Falgueras +GarcÃa, Célestin Marot, David Svensson Fors, Edward Hervey, Enrique +Ocaña González, Frank Dana, Guillaume Desmottes, He Junyan, James +Hilliard, Jan Alexander Steffens (heftig), Jan Schmidt, Jordan Petridis, +Mathieu Duponchelle, Matthew Waters, medithe, Mengkejiergeli Ba, Nicolas +Beland, Nirbheek Chauhan, Patricia Muscalu, Pawel Stawicki, Philippe +Normand, Piotr BrzeziÅski, Rajneesh Soni, Robert Rosengren, Sanchayan +Maity, Sebastian Dröge, Seungha Yang, Simon Himmelbauer, Thibault +Saunier, Tim-Philipp Müller, Tristan van Berkom, U. Artie Eoff, VÃctor +Manuel Jáquez Leal, Vivia Nikolaidou, Xuchen Yang, Yinhang Liu, + +⦠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.22.1 + +- List of Merge Requests applied in 1.22.1 +- List of Issues fixed in 1.22.1 + Schedule for 1.24 Our next major feature release will be 1.24, and 1.23 will be the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-libav-1.22.0/RELEASE new/gst-libav-1.22.1/RELEASE --- old/gst-libav-1.22.0/RELEASE 2023-01-23 20:29:34.000000000 +0100 +++ new/gst-libav-1.22.1/RELEASE 2023-03-04 14:42:32.000000000 +0100 @@ -1,4 +1,4 @@ -This is GStreamer gst-libav 1.22.0. +This is GStreamer gst-libav 1.22.1. The GStreamer team is thrilled to announce a new major feature release of your favourite cross-platform multimedia framework! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-libav-1.22.0/ext/libav/gstavauddec.c new/gst-libav-1.22.1/ext/libav/gstavauddec.c --- old/gst-libav-1.22.0/ext/libav/gstavauddec.c 2023-01-23 20:29:34.000000000 +0100 +++ new/gst-libav-1.22.1/ext/libav/gstavauddec.c 2023-03-04 14:42:32.000000000 +0100 @@ -773,8 +773,10 @@ } if (avcodec_send_packet (ffmpegdec->context, &packet) < 0) { + av_packet_free_side_data (&packet); goto send_packet_failed; } + av_packet_free_side_data (&packet); do { /* decode a frame of audio now */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-libav-1.22.0/ext/libav/gstavcodecmap.c new/gst-libav-1.22.1/ext/libav/gstavcodecmap.c --- old/gst-libav-1.22.0/ext/libav/gstavcodecmap.c 2023-01-23 20:29:34.000000000 +0100 +++ new/gst-libav-1.22.1/ext/libav/gstavcodecmap.c 2023-03-04 14:42:32.000000000 +0100 @@ -2956,13 +2956,14 @@ bpp += GST_VIDEO_INFO_COMP_DEPTH (info, i); context->bits_per_coded_sample = bpp; - context->time_base.den = 1000000000; - context->time_base.num = 1; context->ticks_per_frame = 1; - - if (GST_VIDEO_INFO_FPS_N (info) != 0) { - context->framerate.num = GST_VIDEO_INFO_FPS_N (info); - context->framerate.den = GST_VIDEO_INFO_FPS_D (info); + if (GST_VIDEO_INFO_FPS_N (info) == 0) { + GST_DEBUG ("Using 25/1 framerate"); + context->time_base.den = 25; + context->time_base.num = 1; + } else { + context->time_base.den = GST_VIDEO_INFO_FPS_N (info); + context->time_base.num = GST_VIDEO_INFO_FPS_D (info); } context->sample_aspect_ratio.num = GST_VIDEO_INFO_PAR_N (info); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-libav-1.22.0/ext/libav/gstavviddec.c new/gst-libav-1.22.1/ext/libav/gstavviddec.c --- old/gst-libav-1.22.0/ext/libav/gstavviddec.c 2023-01-23 20:29:34.000000000 +0100 +++ new/gst-libav-1.22.1/ext/libav/gstavviddec.c 2023-03-04 14:42:32.000000000 +0100 @@ -35,6 +35,10 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE); +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,132,100) +#define AV_CODEC_CAP_OTHER_THREADS AV_CODEC_CAP_AUTO_THREADS +#endif + #define GST_FFMPEG_VIDEO_CODEC_FRAME_FLAG_ALLOCATED (1<<15) #define MAX_TS_MASK 0xff @@ -615,7 +619,7 @@ if (ffmpegdec->max_threads == 0) { /* When thread type is FF_THREAD_FRAME, extra latency is introduced equal * to one frame per thread. We thus need to calculate the thread count ourselves */ - if ((!(oclass->in_plugin->capabilities & AV_CODEC_CAP_AUTO_THREADS)) || + if ((!(oclass->in_plugin->capabilities & AV_CODEC_CAP_OTHER_THREADS)) || (ffmpegdec->context->thread_type & FF_THREAD_FRAME)) ffmpegdec->context->thread_count = MIN (gst_ffmpeg_auto_max_threads (), 16); @@ -2115,6 +2119,9 @@ /* now decode the frame */ gst_avpacket_init (&packet, data, size); + if (!packet.size) + goto done; + if (ffmpegdec->palette) { guint8 *pal; @@ -2124,9 +2131,6 @@ GST_DEBUG_OBJECT (ffmpegdec, "copy pal %p %p", &packet, pal); } - if (!packet.size) - goto done; - /* save reference to the timing info */ ffmpegdec->context->reordered_opaque = (gint64) frame->system_frame_number; ffmpegdec->picture->reordered_opaque = (gint64) frame->system_frame_number; @@ -2142,8 +2146,10 @@ GST_VIDEO_DECODER_STREAM_UNLOCK (ffmpegdec); if (avcodec_send_packet (ffmpegdec->context, &packet) < 0) { GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec); + av_packet_free_side_data (&packet); goto send_packet_failed; } + av_packet_free_side_data (&packet); GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec); do { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-libav-1.22.0/ext/libav/gstavvidenc.c new/gst-libav-1.22.1/ext/libav/gstavvidenc.c --- old/gst-libav-1.22.0/ext/libav/gstavvidenc.c 2023-01-23 20:29:34.000000000 +0100 +++ new/gst-libav-1.22.1/ext/libav/gstavvidenc.c 2023-03-04 14:42:32.000000000 +0100 @@ -308,7 +308,9 @@ * (1<<16) - 1 . We therefore scale them down. * Agreed, it will not be the exact framerate... but the difference * shouldn't be that noticeable */ - ffmpegenc->context->time_base.num = 1; + ffmpegenc->context->time_base.num = + (gint) gst_util_uint64_scale_int (ffmpegenc->context->time_base.num, + 65535, ffmpegenc->context->time_base.den); ffmpegenc->context->time_base.den = 65535; GST_LOG_OBJECT (ffmpegenc, "MPEG4 : scaled down framerate to %d / %d", ffmpegenc->context->time_base.den, ffmpegenc->context->time_base.num); @@ -715,19 +717,25 @@ GST_VIDEO_CODEC_FRAME_UNSET_SYNC_POINT (frame); } - if (pkt->dts != AV_NOPTS_VALUE) { - frame->dts = - gst_ffmpeg_time_ff_to_gst (pkt->dts + ffmpegenc->pts_offset, - ffmpegenc->context->time_base); - } - /* This will lose some precision compared to setting the PTS from the input - * buffer directly, but that way we're sure PTS and DTS are consistent, in - * particular DTS should always be <= PTS + /* calculate the DTS by taking the PTS/DTS difference from the ffmpeg side + * and applying it to our PTS. We don't use the ffmpeg timestamps verbatim + * because they're too inaccurate and in the framerate time_base */ - if (pkt->pts != AV_NOPTS_VALUE) { - frame->pts = - gst_ffmpeg_time_ff_to_gst (pkt->pts + ffmpegenc->pts_offset, - ffmpegenc->context->time_base); + if (pkt->dts != AV_NOPTS_VALUE) { + gint64 pts_dts_diff = pkt->dts - pkt->pts; + if (pts_dts_diff < 0) { + GstClockTime gst_pts_dts_diff = gst_ffmpeg_time_ff_to_gst (-pts_dts_diff, + ffmpegenc->context->time_base); + + if (gst_pts_dts_diff > frame->pts) + frame->pts = 0; + else + frame->dts = frame->pts - gst_pts_dts_diff; + } else { + frame->dts = frame->pts + + gst_ffmpeg_time_ff_to_gst (pts_dts_diff, + ffmpegenc->context->time_base); + } } ret = gst_video_encoder_finish_frame (GST_VIDEO_ENCODER (ffmpegenc), frame); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-libav-1.22.0/gst-libav.doap new/gst-libav-1.22.1/gst-libav.doap --- old/gst-libav-1.22.0/gst-libav.doap 2023-01-23 20:29:34.000000000 +0100 +++ new/gst-libav-1.22.1/gst-libav.doap 2023-03-04 14:42:32.000000000 +0100 @@ -34,6 +34,16 @@ <release> <Version> + <revision>1.22.1</revision> + <branch>1.22</branch> + <name></name> + <created>2023-03-04</created> + <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.22.1.tar.xz" /> + </Version> + </release> + + <release> + <Version> <revision>1.22.0</revision> <branch>main</branch> <name></name> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-libav-1.22.0/meson.build new/gst-libav-1.22.1/meson.build --- old/gst-libav-1.22.0/meson.build 2023-01-23 20:29:34.000000000 +0100 +++ new/gst-libav-1.22.1/meson.build 2023-03-04 14:42:32.000000000 +0100 @@ -1,5 +1,5 @@ project('gst-libav', 'c', - version : '1.22.0', + version : '1.22.1', meson_version : '>= 0.62', default_options : [ 'warning_level=1', 'buildtype=debugoptimized' ]) ++++++ reduce-required-meson.patch ++++++ --- /var/tmp/diff_new_pack.gCjyEI/_old 2023-03-12 16:22:37.572336791 +0100 +++ /var/tmp/diff_new_pack.gCjyEI/_new 2023-03-12 16:22:37.580336827 +0100 @@ -1,10 +1,10 @@ -Index: gstreamer-1.22.0/meson.build +Index: gst-libav-1.22.1/meson.build =================================================================== ---- gstreamer-1.22.0.orig/meson.build -+++ gstreamer-1.22.0/meson.build +--- gst-libav-1.22.1.orig/meson.build ++++ gst-libav-1.22.1/meson.build @@ -1,6 +1,6 @@ project('gst-libav', 'c', - version : '1.22.0', + version : '1.22.1', - meson_version : '>= 0.62', + meson_version : '>= 0.61', default_options : [ 'warning_level=1',