Commit f687f14a authored by flx42's avatar flx42

jni: do not prevent thumbnailing of large videos (e.g. 4K)

Bump upper bound on video dimension to 4096x2304, this format is used
by some 4K cameras and thus many samples are using this resolution.
parent 925e8b83
......@@ -34,6 +34,10 @@
#define THUMBNAIL_POSITION 0.5
#define PIXEL_SIZE 4 /* RGBA */
#define THUMBNAIL_MIN_WIDTH 32
#define THUMBNAIL_MAX_WIDTH 4096
#define THUMBNAIL_MIN_HEIGHT 32
#define THUMBNAIL_MAX_HEIGHT 2304
/*
......@@ -207,7 +211,8 @@ jbyteArray Java_org_videolan_libvlc_LibVLC_getThumbnail(JNIEnv *env, jobject thi
goto end;
}
if( videoWidth < 32 || videoHeight < 32 || videoWidth > 2048 || videoWidth > 2048 )
if( videoWidth < THUMBNAIL_MIN_WIDTH || videoHeight < THUMBNAIL_MIN_HEIGHT
|| videoWidth > THUMBNAIL_MAX_WIDTH || videoHeight > THUMBNAIL_MAX_HEIGHT )
{
LOGE("Wrong video dimensions.\n");
goto end;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment