On Thu Jul 31 05:43:48 2025 +0000, Brendan McGrath wrote:
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.
Ah, interesting. Thanks for looking in to that. I can't speak to any of that, really - I'm not very familiar with winegstreamer at all. I was more wondering if we needed to explicitly set `byte-stream`, and maybe we don't?: tclem/wine!8. Not sure if the tests cover the initial issue you were addressing though. And I guess if it fixates to AVC but doesn't have the required `codec_data` then maybe `byte-stream` is the only option. But like I said, that has broken h.264 on macOS.