[PATCH 0/5] MR242: winegstreamer: Use wg_sample to read wg_parser data.

Rémi Bernon (@rbernon) wine at gitlab.winehq.org
Thu Jun 16 01:55:05 CDT 2022


On Thu Jun 16 00:25:27 2022 +0000, **** wrote:
> Zebediah Figura replied on the mailing list:
> ```
> On 6/14/22 02:26, Rémi Bernon wrote:
> > From: Rémi Bernon <rbernon at codeweavers.com>
> > 
> > It is invalid according to GStreamer documentation.
> What documentation are you referring to?
> The documentation for GstPadGetRangeFunction itself is somewhat badly 
> written and doesn't actually mention what "buffer" is expected to 
> contain on input, but the documentation for gst_pad_get_range() says:
>      If buffer points to a variable holding NULL, a valid new GstBuffer 
> will be placed in buffer when this function returns GST_FLOW_OK. The new 
> buffer must be freed with gst_buffer_unref after usage.
>      When buffer points to a variable that points to a valid GstBuffer, 
> the buffer will be filled with the result data when this function 
> returns GST_FLOW_OK. If the provided buffer is larger than size, only 
> size bytes will be filled in the result buffer and its size will be 
> updated accordingly.
> and the implementation shows that the intent is for the same to apply to 
> GstPadGetRangeFunction.
> For what it's worth, I believe oggdemux actually does pass a non-NULL 
> buffer, and breaks if we don't fill that.
> ```
I was referring to `If this function returns GST_FLOW_OK, the result buffer will be stored in buffer. The contents of buffer is invalid for any other return value.`, but looking at `gst_pad_get_range` and `gst_pad_pull_range` source, I believe you're right...

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/242#note_2176



More information about the wine-devel mailing list