Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +23 −9 Original line number Diff line number Diff line Loading @@ -2077,17 +2077,27 @@ void NuPlayer::updateVideoSize( return; } int32_t displayWidth, displayHeight; int32_t displayWidth = 0, displayHeight = 0; if (outputFormat != NULL) { int32_t width, height, cropLeft, cropTop, cropRight, cropBottom; if (outputFormat->findInt32("width", &width) && outputFormat->findInt32("height", &height) && outputFormat->findRect( int32_t width, height; if (!outputFormat->findInt32("width", &width) || !outputFormat->findInt32("height", &height)) { ALOGW("Video output format missing dimension: %s", outputFormat->debugString().c_str()); notifyListener(MEDIA_SET_VIDEO_SIZE, 0, 0); return; } int32_t cropLeft, cropTop, cropRight, cropBottom; if (outputFormat->findRect( "crop", &cropLeft, &cropTop, &cropRight, &cropBottom)) { displayWidth = cropRight - cropLeft + 1; displayHeight = cropBottom - cropTop + 1; } else { displayWidth = width; displayHeight = height; } ALOGV("Video output format changed to %d x %d " "(crop: %d x %d @ (%d, %d))", Loading @@ -2095,7 +2105,6 @@ void NuPlayer::updateVideoSize( displayWidth, displayHeight, cropLeft, cropTop); } } else { if (!inputFormat->findInt32("width", &displayWidth) || !inputFormat->findInt32("height", &displayHeight)) { Loading Loading @@ -2143,6 +2152,11 @@ void NuPlayer::updateVideoSize( displayHeight = tmp; } if (displayWidth <= 0 || displayHeight <= 0) { ALOGE("video size is corrupted or bad, reset it to 0"); displayWidth = displayHeight = 0; } notifyListener( MEDIA_SET_VIDEO_SIZE, displayWidth, Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +23 −9 Original line number Diff line number Diff line Loading @@ -2077,17 +2077,27 @@ void NuPlayer::updateVideoSize( return; } int32_t displayWidth, displayHeight; int32_t displayWidth = 0, displayHeight = 0; if (outputFormat != NULL) { int32_t width, height, cropLeft, cropTop, cropRight, cropBottom; if (outputFormat->findInt32("width", &width) && outputFormat->findInt32("height", &height) && outputFormat->findRect( int32_t width, height; if (!outputFormat->findInt32("width", &width) || !outputFormat->findInt32("height", &height)) { ALOGW("Video output format missing dimension: %s", outputFormat->debugString().c_str()); notifyListener(MEDIA_SET_VIDEO_SIZE, 0, 0); return; } int32_t cropLeft, cropTop, cropRight, cropBottom; if (outputFormat->findRect( "crop", &cropLeft, &cropTop, &cropRight, &cropBottom)) { displayWidth = cropRight - cropLeft + 1; displayHeight = cropBottom - cropTop + 1; } else { displayWidth = width; displayHeight = height; } ALOGV("Video output format changed to %d x %d " "(crop: %d x %d @ (%d, %d))", Loading @@ -2095,7 +2105,6 @@ void NuPlayer::updateVideoSize( displayWidth, displayHeight, cropLeft, cropTop); } } else { if (!inputFormat->findInt32("width", &displayWidth) || !inputFormat->findInt32("height", &displayHeight)) { Loading Loading @@ -2143,6 +2152,11 @@ void NuPlayer::updateVideoSize( displayHeight = tmp; } if (displayWidth <= 0 || displayHeight <= 0) { ALOGE("video size is corrupted or bad, reset it to 0"); displayWidth = displayHeight = 0; } notifyListener( MEDIA_SET_VIDEO_SIZE, displayWidth, Loading