[vlc-devel] [PATCH] mft: Use the right index for IMFSample_GetBufferByIndex

Martin Storsjö martin at martin.st
Mon Oct 27 20:05:51 CET 2014


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.
---
 modules/codec/mft.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/mft.c b/modules/codec/mft.c
index 3ece889..02f2f79 100644
--- a/modules/codec/mft.c
+++ b/modules/codec/mft.c
@@ -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;
 
-- 
1.9.3 (Apple Git-50)




More information about the vlc-devel mailing list