[vlc-devel] [PATCH] Fix issue with jni_ConfigureSurface return value. Only check for configure flag if return is equal to 0. Return value of -1 is ignored.
Thomas Guillem
thomas at gllm.fr
Fri Nov 28 11:24:11 CET 2014
On Fri, Nov 28, 2014, at 01:20, Paulo Vitor Magacho da Silva wrote:
> ---
> modules/video_output/android/surface.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/video_output/android/surface.c
> b/modules/video_output/android/surface.c
> index bd10618..ce1f922 100644
> --- a/modules/video_output/android/surface.c
> +++ b/modules/video_output/android/surface.c
> @@ -352,7 +352,7 @@ static int AndroidLockSurface(picture_t *picture)
> aligned_width,
> sh,
> sys->i_android_hal,
> - &configured) == -1 || !configured) {
> + &configured) == 0 && !configured) {
Why ignoring return of -1 ? It's an error case, you should return
VLC_EGENERIC in that case too. And the configure flag is checked only if
return is different from -1 (or equal 0).
> return VLC_EGENERIC;
> }
> sys->i_alloc_width = aligned_width;
> --
> 1.9.3 (Apple Git-50)
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list