Commit b69717e7 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winegstreamer: Use IWMSyncReader2_GetReadStreamSamples in the async reader.

parent cbd7be3f
......@@ -196,8 +196,6 @@ HRESULT wm_reader_get_output_format(struct wm_reader *reader, DWORD output,
HRESULT wm_reader_get_output_format_count(struct wm_reader *reader, DWORD output, DWORD *count);
HRESULT wm_reader_get_output_props(struct wm_reader *reader, DWORD output,
IWMOutputMediaProps **props);
struct wm_stream *wm_reader_get_stream_by_stream_number(struct wm_reader *reader,
WORD stream_number);
HRESULT wm_reader_get_stream_sample(struct wm_reader *reader, IWMReaderCallbackAdvanced *callback_advanced, WORD stream_number,
INSSBuffer **ret_sample, QWORD *pts, QWORD *duration, DWORD *flags, WORD *ret_stream_number);
HRESULT wm_reader_get_stream_selection(struct wm_reader *reader,
......
......@@ -138,7 +138,6 @@ static void async_reader_deliver_sample(struct async_reader *reader, struct samp
{
IWMReaderCallbackAdvanced *callback_advanced = reader->callback_advanced;
IWMReaderCallback *callback = reader->callback;
struct wm_stream *stream;
BOOL read_compressed;
HRESULT hr;
......@@ -146,8 +145,9 @@ static void async_reader_deliver_sample(struct async_reader *reader, struct samp
reader, sample->stream, debugstr_time(sample->pts), debugstr_time(sample->duration),
sample->flags, sample->buffer);
stream = wm_reader_get_stream_by_stream_number(reader->wm_reader, sample->stream);
read_compressed = stream->read_compressed;
if (FAILED(hr = IWMSyncReader2_GetReadStreamSamples(reader->reader, sample->stream,
&read_compressed)))
read_compressed = FALSE;
LeaveCriticalSection(&reader->callback_cs);
if (read_compressed)
......
......@@ -1580,7 +1580,7 @@ HRESULT wm_reader_close(struct wm_reader *reader)
return S_OK;
}
struct wm_stream *wm_reader_get_stream_by_stream_number(struct wm_reader *reader, WORD stream_number)
static struct wm_stream *wm_reader_get_stream_by_stream_number(struct wm_reader *reader, WORD stream_number)
{
if (stream_number && stream_number <= reader->stream_count)
return &reader->streams[stream_number - 1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment