winegstreamer: Make the file_size field of struct parser into a local variable.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2e26556643
commit
3c7bcb830f
|
@ -50,8 +50,6 @@ struct parser
|
||||||
unsigned int source_count;
|
unsigned int source_count;
|
||||||
BOOL enum_sink_first;
|
BOOL enum_sink_first;
|
||||||
|
|
||||||
LONGLONG file_size;
|
|
||||||
|
|
||||||
struct wg_parser *wg_parser;
|
struct wg_parser *wg_parser;
|
||||||
|
|
||||||
/* FIXME: It would be nice to avoid duplicating these with strmbase.
|
/* FIXME: It would be nice to avoid duplicating these with strmbase.
|
||||||
|
@ -947,20 +945,20 @@ static HRESULT sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE
|
||||||
static HRESULT parser_sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *pmt)
|
static HRESULT parser_sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *pmt)
|
||||||
{
|
{
|
||||||
struct parser *filter = impl_from_strmbase_sink(iface);
|
struct parser *filter = impl_from_strmbase_sink(iface);
|
||||||
|
LONGLONG file_size, unused;
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr = S_OK;
|
||||||
LONGLONG unused;
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
filter->reader = NULL;
|
filter->reader = NULL;
|
||||||
if (FAILED(hr = IPin_QueryInterface(peer, &IID_IAsyncReader, (void **)&filter->reader)))
|
if (FAILED(hr = IPin_QueryInterface(peer, &IID_IAsyncReader, (void **)&filter->reader)))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
IAsyncReader_Length(filter->reader, &filter->file_size, &unused);
|
IAsyncReader_Length(filter->reader, &file_size, &unused);
|
||||||
|
|
||||||
filter->sink_connected = true;
|
filter->sink_connected = true;
|
||||||
filter->read_thread = CreateThread(NULL, 0, read_thread, filter, 0, NULL);
|
filter->read_thread = CreateThread(NULL, 0, read_thread, filter, 0, NULL);
|
||||||
|
|
||||||
if (FAILED(hr = unix_funcs->wg_parser_connect(filter->wg_parser, filter->file_size)))
|
if (FAILED(hr = unix_funcs->wg_parser_connect(filter->wg_parser, file_size)))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (!filter->init_gst(filter))
|
if (!filter->init_gst(filter))
|
||||||
|
|
Loading…
Reference in New Issue