[PATCH 1/2] quartz: Remove redundant if clause from WAVEParser_InputPin_PreConnect
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/quartz/waveparser.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index 403c052db4..d8f349b35f 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -306,15 +306,12 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin, return E_FAIL; } - if (hr == S_OK) - { - pWAVEParser->StartOfFile = MEDIATIME_FROM_BYTES(pos + sizeof(RIFFCHUNK)); - pWAVEParser->EndOfFile = MEDIATIME_FROM_BYTES(pos + chunk.cb + sizeof(RIFFCHUNK)); - } - if (hr != S_OK) return E_FAIL; + pWAVEParser->StartOfFile = MEDIATIME_FROM_BYTES(pos + sizeof(RIFFCHUNK)); + pWAVEParser->EndOfFile = MEDIATIME_FROM_BYTES(pos + chunk.cb + sizeof(RIFFCHUNK)); + props->cbAlign = ((WAVEFORMATEX*)amt.pbFormat)->nBlockAlign; props->cbPrefix = 0; props->cbBuffer = 4096; -- 2.18.0
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/quartz/waveparser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index d8f349b35f..fa9cd45d27 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -206,13 +206,15 @@ static HRESULT WINAPI WAVEParserImpl_seek(IMediaSeeking *iface) if (newpos > endpos) { - WARN("Requesting position %x%08x beyond end of stream %x%08x\n", (DWORD)(newpos>>32), (DWORD)newpos, (DWORD)(endpos>>32), (DWORD)endpos); + WARN("Requesting position %s beyond end of stream %s\n", + wine_dbgstr_longlong(newpos), wine_dbgstr_longlong(endpos)); return E_INVALIDARG; } if (curpos/1000000 == newpos/1000000) { - TRACE("Requesting position %x%08x same as current position %x%08x\n", (DWORD)(newpos>>32), (DWORD)newpos, (DWORD)(curpos>>32), (DWORD)curpos); + TRACE("Requesting position %s same as current position %s\n", + wine_dbgstr_longlong(newpos), wine_dbgstr_longlong(curpos)); return S_OK; } -- 2.18.0
Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> On Fri, Aug 10, 2018 at 12:00:34AM -0600, Alex Henrie wrote:
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/quartz/waveparser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index d8f349b35f..fa9cd45d27 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -206,13 +206,15 @@ static HRESULT WINAPI WAVEParserImpl_seek(IMediaSeeking *iface)
if (newpos > endpos) { - WARN("Requesting position %x%08x beyond end of stream %x%08x\n", (DWORD)(newpos>>32), (DWORD)newpos, (DWORD)(endpos>>32), (DWORD)endpos); + WARN("Requesting position %s beyond end of stream %s\n", + wine_dbgstr_longlong(newpos), wine_dbgstr_longlong(endpos)); return E_INVALIDARG; }
if (curpos/1000000 == newpos/1000000) { - TRACE("Requesting position %x%08x same as current position %x%08x\n", (DWORD)(newpos>>32), (DWORD)newpos, (DWORD)(curpos>>32), (DWORD)curpos); + TRACE("Requesting position %s same as current position %s\n", + wine_dbgstr_longlong(newpos), wine_dbgstr_longlong(curpos)); return S_OK; }
-- 2.18.0
Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> On Fri, Aug 10, 2018 at 12:00:33AM -0600, Alex Henrie wrote:
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> --- dlls/quartz/waveparser.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index 403c052db4..d8f349b35f 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -306,15 +306,12 @@ static HRESULT WAVEParser_InputPin_PreConnect(IPin * iface, IPin * pConnectPin, return E_FAIL; }
- if (hr == S_OK) - { - pWAVEParser->StartOfFile = MEDIATIME_FROM_BYTES(pos + sizeof(RIFFCHUNK)); - pWAVEParser->EndOfFile = MEDIATIME_FROM_BYTES(pos + chunk.cb + sizeof(RIFFCHUNK)); - } - if (hr != S_OK) return E_FAIL;
+ pWAVEParser->StartOfFile = MEDIATIME_FROM_BYTES(pos + sizeof(RIFFCHUNK)); + pWAVEParser->EndOfFile = MEDIATIME_FROM_BYTES(pos + chunk.cb + sizeof(RIFFCHUNK)); + props->cbAlign = ((WAVEFORMATEX*)amt.pbFormat)->nBlockAlign; props->cbPrefix = 0; props->cbBuffer = 4096; -- 2.18.0
participants (2)
-
Alex Henrie -
Andrew Eikum