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

Felix Abecassis felix.abecassis at gmail.com
Mon Oct 27 21:47:55 CET 2014


You are absolutely right, LGTM.

2014-10-27 12:05 GMT-07:00 Martin Storsjö <martin at martin.st>:
> 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)
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



-- 
Félix Abecassis
http://felix.abecassis.me



More information about the vlc-devel mailing list