mfreadwrite: Unset seeking flag also on SourceStarted and SourceStopped.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ac0f240ac6
commit
1a7be75656
|
@ -550,9 +550,11 @@ static HRESULT source_reader_source_state_handler(struct source_reader *reader,
|
|||
{
|
||||
case MESourceStarted:
|
||||
reader->source_state = SOURCE_STATE_STARTED;
|
||||
reader->flags &= ~SOURCE_READER_SEEKING;
|
||||
break;
|
||||
case MESourceStopped:
|
||||
reader->source_state = SOURCE_STATE_STOPPED;
|
||||
reader->flags &= ~SOURCE_READER_SEEKING;
|
||||
break;
|
||||
case MESourceSeeked:
|
||||
reader->flags &= ~SOURCE_READER_SEEKING;
|
||||
|
|
|
@ -902,6 +902,7 @@ static void test_source_reader_from_media_source(void)
|
|||
IMFAttributes *attributes;
|
||||
ULONG refcount;
|
||||
int i;
|
||||
PROPVARIANT pos;
|
||||
|
||||
source = create_test_source();
|
||||
ok(!!source, "Failed to create test source.\n");
|
||||
|
@ -916,6 +917,11 @@ static void test_source_reader_from_media_source(void)
|
|||
hr = IMFSourceReader_SetStreamSelection(reader, 1, TRUE);
|
||||
ok(hr == S_OK, "Failed to select a stream, hr %#x.\n", hr);
|
||||
|
||||
pos.vt = VT_I8;
|
||||
pos.hVal.QuadPart = 0;
|
||||
hr = IMFSourceReader_SetCurrentPosition(reader, &GUID_NULL, &pos);
|
||||
ok(hr == S_OK, "Failed to seek to beginning of stream, hr %#x.\n", hr);
|
||||
|
||||
hr = IMFSourceReader_ReadSample(reader, MF_SOURCE_READER_ANY_STREAM, 0, &actual_index, &stream_flags,
|
||||
×tamp, &sample);
|
||||
ok(hr == S_OK, "Failed to get a sample, hr %#x.\n", hr);
|
||||
|
|
Loading…
Reference in New Issue