[PATCH 0/1] MR9757: mfsrcsnk: Use stream_map for index value on stream start.
Fixes an issue where the queued samples for one stream can end up on the other when performing a pause/play. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9757
From: Brendan McGrath <bmcgrath@codeweavers.com> Fixes an issue where the queued samples for one stream can end up on the other when performing a pause/play. --- dlls/mfsrcsnk/media_source.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/mfsrcsnk/media_source.c b/dlls/mfsrcsnk/media_source.c index 16bf0c09204..b6f5654f8b0 100644 --- a/dlls/mfsrcsnk/media_source.c +++ b/dlls/mfsrcsnk/media_source.c @@ -493,7 +493,7 @@ static HRESULT media_source_start(struct media_source *source, IMFPresentationDe for (i = 0; i < source->stream_count; i++) { struct media_stream *stream = source->streams[i]; - media_stream_start(stream, i, position); + media_stream_start(stream, source->stream_map[i], position); } if (position->vt == VT_I8 && (status = winedmo_demuxer_seek(source->winedmo_demuxer, position->hVal.QuadPart))) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9757
Another way to fix this is by changing `media_stream_start` to accept either stream or index, and obtain the other value within `media_stream_start`. That way no one calling `media_stream_start` could pass mismatched values. But it's only called in one spot at the moment, so maybe just fixing it at the call site is good enough. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9757#note_125500
It looks good to me, but it probably doesn't count as regression fix though. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9757#note_125530
participants (3)
-
Brendan McGrath -
Brendan McGrath (@redmcg) -
Rémi Bernon (@rbernon)