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

winegstreamer: Set MFT_OUTPUT_DATA_BUFFER_INCOMPLETE in wg_transform_read_mf.

parent 61783928
......@@ -595,8 +595,10 @@ static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags,
return MF_E_BUFFERTOOSMALL;
}
if (SUCCEEDED(hr = wg_transform_read_mf(impl->wg_transform, wg_sample, NULL)))
if (SUCCEEDED(hr = wg_transform_read_mf(impl->wg_transform, wg_sample, NULL,
&samples[0].dwStatus)))
wg_sample_queue_flush(impl->wg_sample_queue, false);
wg_sample_release(wg_sample);
if (hr == MF_E_TRANSFORM_STREAM_CHANGE)
......
......@@ -135,7 +135,7 @@ HRESULT wg_transform_push_mf(struct wg_transform *transform, struct wg_sample *s
HRESULT wg_transform_push_quartz(struct wg_transform *transform, struct wg_sample *sample,
struct wg_sample_queue *queue);
HRESULT wg_transform_read_mf(struct wg_transform *transform, struct wg_sample *sample,
struct wg_format *format);
struct wg_format *format, DWORD *flags);
HRESULT wg_transform_read_quartz(struct wg_transform *transform, struct wg_sample *sample);
HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj);
......
......@@ -641,8 +641,10 @@ static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags,
return MF_E_BUFFERTOOSMALL;
}
if (SUCCEEDED(hr = wg_transform_read_mf(decoder->wg_transform, wg_sample, &wg_format)))
if (SUCCEEDED(hr = wg_transform_read_mf(decoder->wg_transform, wg_sample, &wg_format,
&samples[0].dwStatus)))
wg_sample_queue_flush(decoder->wg_sample_queue, false);
wg_sample_release(wg_sample);
if (hr == MF_E_TRANSFORM_STREAM_CHANGE)
......
......@@ -565,12 +565,9 @@ static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags,
return MF_E_BUFFERTOOSMALL;
}
if (SUCCEEDED(hr = wg_transform_read_mf(impl->wg_transform, wg_sample, NULL)))
{
if (wg_sample->flags & WG_SAMPLE_FLAG_INCOMPLETE)
samples[0].dwStatus |= MFT_OUTPUT_DATA_BUFFER_INCOMPLETE;
if (SUCCEEDED(hr = wg_transform_read_mf(impl->wg_transform, wg_sample, NULL,
&samples[0].dwStatus)))
wg_sample_queue_flush(impl->wg_sample_queue, false);
}
wg_sample_release(wg_sample);
......
......@@ -571,8 +571,10 @@ static HRESULT WINAPI video_processor_ProcessOutput(IMFTransform *iface, DWORD f
return MF_E_BUFFERTOOSMALL;
}
if (SUCCEEDED(hr = wg_transform_read_mf(impl->wg_transform, wg_sample, NULL)))
if (SUCCEEDED(hr = wg_transform_read_mf(impl->wg_transform, wg_sample, NULL,
&samples[0].dwStatus)))
wg_sample_queue_flush(impl->wg_sample_queue, false);
wg_sample_release(wg_sample);
if (hr == MF_E_TRANSFORM_STREAM_CHANGE)
......
......@@ -20,6 +20,7 @@
#include "wmcodecdsp.h"
#include "mfapi.h"
#include "mferror.h"
#include "wine/debug.h"
#include "wine/list.h"
......@@ -282,12 +283,12 @@ HRESULT wg_transform_push_mf(struct wg_transform *transform, struct wg_sample *w
}
HRESULT wg_transform_read_mf(struct wg_transform *transform, struct wg_sample *wg_sample,
struct wg_format *format)
struct wg_format *format, DWORD *flags)
{
struct sample *sample = unsafe_mf_from_wg_sample(wg_sample);
HRESULT hr;
TRACE_(mfplat)("transform %p, wg_sample %p, format %p.\n", transform, wg_sample, format);
TRACE_(mfplat)("transform %p, wg_sample %p, format %p, flags %p.\n", transform, wg_sample, format, flags);
if (FAILED(hr = wg_transform_read_data(transform, wg_sample, format)))
return hr;
......@@ -295,6 +296,8 @@ HRESULT wg_transform_read_mf(struct wg_transform *transform, struct wg_sample *w
if (FAILED(hr = IMFMediaBuffer_SetCurrentLength(sample->u.mf.buffer, wg_sample->size)))
return hr;
if (wg_sample->flags & WG_SAMPLE_FLAG_INCOMPLETE)
*flags |= MFT_OUTPUT_DATA_BUFFER_INCOMPLETE;
if (wg_sample->flags & WG_SAMPLE_FLAG_HAS_PTS)
IMFSample_SetSampleTime(sample->u.mf.sample, wg_sample->pts);
if (wg_sample->flags & WG_SAMPLE_FLAG_HAS_DURATION)
......
......@@ -591,12 +591,9 @@ static HRESULT WINAPI transform_ProcessOutput(IMFTransform *iface, DWORD flags,
return MF_E_BUFFERTOOSMALL;
}
if (SUCCEEDED(hr = wg_transform_read_mf(decoder->wg_transform, wg_sample, NULL)))
{
if (wg_sample->flags & WG_SAMPLE_FLAG_INCOMPLETE)
samples[0].dwStatus |= MFT_OUTPUT_DATA_BUFFER_INCOMPLETE;
if (SUCCEEDED(hr = wg_transform_read_mf(decoder->wg_transform, wg_sample, NULL,
&samples[0].dwStatus)))
wg_sample_queue_flush(decoder->wg_sample_queue, false);
}
wg_sample_release(wg_sample);
......
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