Fix SVACE issues 21/148421/3
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Fri, 8 Sep 2017 02:02:52 +0000 (11:02 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 12 Sep 2017 07:52:39 +0000 (16:52 +0900)
- Check NULL dereference at window-impl-ecore-wl.cpp:880, 1467
- Initialized member variables in TizenVideoPlayer
- Fix the correct expression at image-operations.cpp:478
- Fix not to return NULL pointer at video-player-impl.cpp:136

Change-Id: I6ba410ab3406cca2a9b66c66345654c374278628
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
adaptors/common/video-player-impl.cpp
adaptors/ecore/wayland/window-impl-ecore-wl.cpp
platform-abstractions/portable/image-operations.cpp
plugins/video-player/tizen-video-player.cpp

index feab793..50e3e6b 100644 (file)
@@ -133,7 +133,7 @@ std::string VideoPlayer::GetUrl()
     return mPlugin->GetUrl();
   }
 
-  return std::string( NULL );
+  return std::string();
 }
 
 void VideoPlayer::SetLooping(bool looping)
index 6f785d0..971be10 100644 (file)
@@ -877,7 +877,10 @@ bool Window::IsVisible() const
 void Window::RotationDone( int orientation, int width, int height )
 {
   ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
-  wlSurface->RequestRotation( orientation, width, height );
+  if( wlSurface )
+  {
+    wlSurface->RequestRotation( orientation, width, height );
+  }
 
   mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( width, height ) );
 
@@ -1461,7 +1464,10 @@ Dali::DevelWindow::WindowPosition Window::GetPosition()
 void Window::SetTransparency( bool transparent )
 {
   ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
-  wlSurface->SetTransparency( transparent );
+  if( wlSurface )
+  {
+    wlSurface->SetTransparency( transparent );
+  }
 }
 
 } // Adaptor
index 2c5da3b..e9a94cc 100644 (file)
@@ -475,7 +475,7 @@ ImageDimensions CalculateDesiredDimensions( unsigned int bitmapWidth, unsigned i
   // If both dimensions have values requested, use them both:
   if( requestedWidth != 0 && requestedHeight != 0 )
   {
-    if( requestedWidth <= maxSize && requestedWidth <= maxSize )
+    if( requestedWidth <= maxSize && requestedHeight <= maxSize )
     {
       return ImageDimensions( requestedWidth, requestedHeight );
     }
index f7baa50..e11736e 100644 (file)
@@ -209,11 +209,18 @@ void LogPlayerError( int error )
 } // unnamed namespace
 
 TizenVideoPlayer::TizenVideoPlayer()
-: mPlayer( NULL ),
+: mUrl(),
+  mPlayer( NULL ),
   mPlayerState( PLAYER_STATE_NONE ),
   mTbmSurface( NULL ),
   mPacket( NULL ),
+  mNativeImageSourcePtr( NULL ),
+  mTimer( NULL ),
+  mBackgroundColor( Vector4( 1.0f, 1.0f, 1.0f, 0.0f ) ),
   mTargetType( NativeImage ),
+  mPacketMutex(),
+  mPacketVector(),
+  mEcoreWlWindow( NULL ),
   mAlphaBitChanged( false )
 {
 }