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

Martin Storsjö git at videolan.org
Mon Oct 27 20:37:09 CET 2014


vlc | branch: master | Martin Storsjö <martin at martin.st> | Mon Oct 27 21:05:51 2014 +0200| [d05c17272e276174109758315fbd413164b789d6] | committer: Jean-Baptiste Kempf

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 at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d05c17272e276174109758315fbd413164b789d6
---

 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 143a308..279af12 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;
 



More information about the vlc-commits mailing list