1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

winegstreamer: Ignore an assert in wg_parser.

This gets hit when a wg_parser receives GST_EVENT_FLUSH_START between the wg_parser_stream_get_buffer function return
and the wg_parser_stream_release_buffer call. In this case the NULL buffer can be ignored, it does no harm and there
is no memory leak from this.
This commit is contained in:
Torge Matthies 2024-03-19 04:06:37 +01:00 committed by Alexandre Julliard
parent 215478fc46
commit 62d8d3415c

View File

@ -412,11 +412,12 @@ static NTSTATUS wg_parser_stream_release_buffer(void *args)
pthread_mutex_lock(&parser->mutex);
assert(stream->buffer);
gst_buffer_unmap(stream->buffer, &stream->map_info);
gst_buffer_unref(stream->buffer);
stream->buffer = NULL;
if (stream->buffer)
{
gst_buffer_unmap(stream->buffer, &stream->map_info);
gst_buffer_unref(stream->buffer);
stream->buffer = NULL;
}
pthread_mutex_unlock(&parser->mutex);
pthread_cond_signal(&stream->event_empty_cond);