1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-08 11:26:59 +02:00

mft: Use the right index for IMFSample_GetBufferByIndex

The input stream id is completely unrelated to the input
sample buffer index - the sample allocated in AllocateInputSample
contains one single media buffer, at index 0.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
This commit is contained in:
Martin Storsjö 2014-10-27 21:05:51 +02:00 committed by Jean-Baptiste Kempf
parent 0b9f0d2116
commit d05c17272e

View File

@ -557,7 +557,7 @@ static int ProcessInputStream(decoder_t *p_dec, DWORD stream_id, block_t *p_bloc
goto error;
IMFMediaBuffer *input_media_buffer = NULL;
hr = IMFSample_GetBufferByIndex(input_sample, stream_id, &input_media_buffer);
hr = IMFSample_GetBufferByIndex(input_sample, 0, &input_media_buffer);
if (FAILED(hr))
goto error;