On Thu Jul 31 05:43:48 2025 +0000, Tim Clem wrote:
> Does this need to force `stream-format=byte-stream`? That seems to break
> h.264 decoding on macOS with the [vtdec
> element](https://gstreamer.freedesktop.org/documentation/applemedia/vtdec.h…,
> which only accepts `stream-format=avc`.
I never did get to the bottom of why this was required for `avdec_h264`, after all, GStreamer plays the test file just fine without the need for a `capsfilter` between `h264parse` and `avdec_h264`. So I dug a bit deeper this morning.
It seems it fails under wine as a result of the `GST_EVENT_SEGMENT_DONE` event sent within `complete_drain`. When `h264parse` receives this event, it fixates its caps to `AVC` and then forwards its data buffers to `avdec_h264` without ever providing `codec_data` (which is required for AVC).
Simply removing all the events sent in `complete_drain` fixes this problem but unsurprisingly causes a couple of other test failures (along with one fix!). You can see an example of what I mean here:
https://gitlab.winehq.org/redmcg/wine/-/merge_requests/7
But I'm not sure yet if this is a bug in `h264parse` or in our draining logic.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8532#note_111591
On Wed Jul 30 19:50:02 2025 +0000, Jinoh Kang wrote:
> Surs, the game passes an empty string, but what about other games yet to
> be tested?
> Previously, the function reliably returned `E_NOTIMPL`, so that apps
> recognized the failure. Now this patch is returning empty string for
> *all* inputs.
> This might fix one game (that only passes empty input), but breaks
> everything else that passes non-empty input since the function lies that
> it did the job with an empty output.
> If a patch fixes a game and breaks 100 others, then it's not a good patch.
Test added.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/8671#note_111558