Index: webrtc/sources/modules/video_capture/main/source/video_capture_impl.cc
===================================================================
--- webrtc.orig/sources/modules/video_capture/main/source/video_capture_impl.cc	2012-10-19 00:11:16.487987590 +0200
+++ webrtc/sources/modules/video_capture/main/source/video_capture_impl.cc	2012-11-08 23:55:00.773401149 +0100
@@ -291,9 +291,10 @@
     TickTime startProcessTime = TickTime::Now();
 
     CriticalSectionScoped cs(&_callBackCs);
-
-    const WebRtc_Word32 width = frameInfo.width;
-    const WebRtc_Word32 height = frameInfo.height;
+    const WebRtc_Word32 initWidth = frameInfo.width;
+    const WebRtc_Word32 initHeight = frameInfo.height;
+    const WebRtc_Word32 width = (_rotateFrame == kRotate90 || _rotateFrame == kRotate270)? frameInfo.height : frameInfo.width;
+    const WebRtc_Word32 height = (_rotateFrame == kRotate90 || _rotateFrame == kRotate270)? frameInfo.width : frameInfo.height;
 
     if (frameInfo.codecType == kVideoCodecUnknown)
     {
@@ -330,7 +331,7 @@
         const int conversionResult = ConvertToI420(commonVideoType,
                                                    videoFrame,
                                                    0, 0,  // No cropping
-                                                   width, height,
+                                                   initWidth, initHeight,
                                                    videoFrameLength,
                                                    _rotateFrame,
                                                    &_captureFrame);
Index: webrtc/sources/common_video/libyuv/webrtc_libyuv.cc
===================================================================
--- webrtc.orig/sources/common_video/libyuv/webrtc_libyuv.cc	2012-10-19 00:11:16.487987590 +0200
+++ webrtc/sources/common_video/libyuv/webrtc_libyuv.cc	2012-10-19 00:12:20.959984894 +0200
@@ -176,6 +176,10 @@
   // All sanity tests are conducted within LibYuv.
   int dst_height = dst_frame->Height();
   int dst_width = dst_frame->Width();
+  if(rotation == kRotate90 || rotation == kRotate270){
+    dst_height = dst_frame->Width();
+    dst_width = dst_frame->Height();
+  }
   // TODO(mikhal): When available, use actual stride value.
   int dst_stride = dst_frame->Width();
   int half_dst_width = (dst_width + 1) >> 1;
