On Tue Nov 21 21:53:53 2023 +0000, Alfred Agrell wrote:
Hard to know if there are more samples to process, other than by simply always saying there's more and occasionally returning "sorry, I've got nothing after all". The first input packet returns zero output packets, so the DMO wrapper has to be prepared for unexpected emptiness anyways; might as well reuse that codepath. This code is in the WMA decoder specifically.
This is true. Given GStreamer's asynchronous nature this may arguably even be the best solution. We can assume that the GStreamer element is going to be synchronous, which is often the case, but not always...
It does make me nervous to return DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE and then have a following call to ProcessOutput() fail, though. But I doubt there's a better alternative.