diff -r -u -X diff.exclude myth.14823.1109a/mythtv/programs/mythfrontend/playbackbox.cpp myth.14826.1109a/mythtv/programs/mythfrontend/playbackbox.cpp
--- mythtv/programs/mythfrontend/playbackbox.cpp	2007-11-09 17:56:19.000000000 -0600
+++ mythtv/programs/mythfrontend/playbackbox.cpp	2007-11-09 18:27:18.000000000 -0600
@@ -570,8 +570,12 @@
         drawInfoBounds = area;
     if (name.lower() == "program_info_del" && context == 1 && type == Delete)
         drawInfoBounds = area;
-    if (name.lower() == "video")
+    if (name.lower() == "video") {
         drawVideoBounds = area;
+        QSize size = drawVideoBounds.size();
+        drawVideoBoundsAspect = ((float)size.width()) / ((float)size.height());
+        previewVideoAspect = drawVideoBoundsAspect;
+    }
     if (name.lower() == "group_info")
         drawGroupBounds = area;
     if (name.lower() == "usage")
@@ -1005,15 +1009,62 @@
         QPixmap temp = getPixmap(curitem);
         if (temp.width() > 0)
         {
-            int pixmap_y = 0;
-
-            if (temp.height() < drawVideoBounds.height())
-                pixmap_y = drawVideoBounds.y() + 
-                                (drawVideoBounds.height() - temp.height())/2;
+            if (temp.size() == drawVideoBounds.size())
+            {
+                p->drawPixmap(drawVideoBounds.x(), drawVideoBounds.y(), temp);
+            }
             else
-                pixmap_y = drawVideoBounds.y();
+            {
+                QSize size = drawVideoBounds.size();
+                int voffset = 0, hoffset = 0;
+                float vaspect = ((float) temp.width()) / ((float) temp.height());
+
+                if ( drawVideoBoundsAspect > vaspect)
+                {
+                   // The aspect ratio of the preview window is greater than that of the image
+                   // being displayed.  This can happen when trying to display a 4:3 image
+                   // in a 16:9 window.  We need to calculate the width of the image.
+                   size.setWidth( size.height() * vaspect );
+                }
+                else if (vaspect > drawVideoBoundsAspect && vaspect > 0.0)
+                {
+                   // The aspect ratio of the preview window is smaller than that of the image
+                   // being displayed.  This can happen when trying to display a 16:9 image
+                   // in a 4:3 window.  We need to calculate the height of the image.
+                   size.setHeight( size.width() / vaspect );
+                }
+
+                size.setHeight(((size.height() + 7) / 8) * 8);
+                size.setWidth( ((size.width()  + 7) / 8) * 8);
+
+                hoffset = (drawVideoBounds.width() - size.width()) / 2;
+                voffset = (drawVideoBounds.height() - size.height()) / 2;
+
+                if (hoffset > 0)
+                {
+                    QSize barsize = drawVideoBounds.size();
+                    barsize.setWidth(hoffset);
+                    QPixmap qpm(barsize);
+                    qpm.fill(black);
+                    p->drawPixmap(drawVideoBounds.x(), drawVideoBounds.y(), qpm);
+                    p->drawPixmap(drawVideoBounds.x()+drawVideoBounds.width()-hoffset, drawVideoBounds.y(), qpm);
+                }
+                if (voffset > 0)
+                {
+                    QSize barsize = drawVideoBounds.size();
+                    barsize.setHeight(voffset);
+                    QPixmap qpm(barsize);
+                    qpm.fill(black);
+                    p->drawPixmap(drawVideoBounds.x(), drawVideoBounds.y(), qpm);
+                    p->drawPixmap(drawVideoBounds.x(), drawVideoBounds.y()+drawVideoBounds.height()-(voffset-1), qpm);
+                }
+
+                // Scale and draw the preview image
+                QImage previewImg = temp.convertToImage();
+                QImage previewImgScaled = previewImg.smoothScale (size.width(), size.height());
 
-            p->drawPixmap(drawVideoBounds.x(), pixmap_y, temp);
+                p->drawImage(drawVideoBounds.x() + hoffset, drawVideoBounds.y() + voffset, previewImgScaled);
+            }
         }
     }
 
@@ -1067,6 +1118,9 @@
         previewVideoState = kStarting;
     }
 
+    if (previewVideoState == kStarting)
+        previewVideoAspect = 0.0;
+
     if ((previewVideoState == kStarting) &&
         (!previewVideoStartTimerOn ||
          (previewVideoStartTimer.elapsed() > 500)))
@@ -1079,10 +1133,7 @@
         if (previewVideoNVP)
         {
             if (previewVideoNVP->IsPlaying())
-            {
                 previewVideoState = kPlaying;
-                erase(drawVideoBounds);
-            }
         }
         else
         {
@@ -1111,22 +1162,56 @@
         !playingSomething)
     {
         QSize size = drawVideoBounds.size();
-        float saspect = ((float)size.width() / (float)size.height())  / wmult;
+        int voffset = 0, hoffset = 0;
         float vaspect = previewVideoNVP->GetVideoAspect();
-        size.setHeight((int) ceil(size.height() * (saspect / vaspect) * hmult));
+
+        if ( drawVideoBoundsAspect > vaspect) {
+           // The aspect ratio of the preview window is greater than that of the image
+           // being displayed.  This can happen when trying to display a 4:3 image
+           // in a 16:9 window.  We need to calculate the width of the image.
+           size.setWidth( size.height() * vaspect );
+
+        } else if (vaspect > drawVideoBoundsAspect && vaspect > 0.0) {
+           // The aspect ratio of the preview window is smaller than that of the image
+           // being displayed.  This can happen when trying to display a 16:9 image
+           // in a 4:3 window.  We need to calculate the height of the image
+           size.setHeight( size.width() / vaspect );
+        }
+
         size.setHeight(((size.height() + 7) / 8) * 8);
         size.setWidth( ((size.width()  + 7) / 8) * 8);
-        const QImage &img = previewVideoNVP->GetARGBFrame(size);
 
-        int video_y = 0;
+        hoffset = (drawVideoBounds.width() - size.width()) / 2;
+        voffset = (drawVideoBounds.height() - size.height()) / 2;
 
-        if (img.height() < drawVideoBounds.height())
-            video_y = drawVideoBounds.y() + 
-                            (drawVideoBounds.height() - img.height())/2;
-        else
-            video_y = drawVideoBounds.y();
+        if (hoffset > 0 || voffset > 0) {
+            if (previewVideoAspect != vaspect) {
+                // If the Aspect ratio has changed draw the black bars either above and below the image,
+                // or on either side of the image.
+                previewVideoAspect = vaspect;
+
+                if (hoffset > 0) {
+                    QSize barsize = drawVideoBounds.size();
+                    barsize.setWidth(hoffset);
+                    QPixmap qpm(barsize);
+                    qpm.fill(black);
+                    p->drawPixmap(drawVideoBounds.x(), drawVideoBounds.y(), qpm);
+                    p->drawPixmap(drawVideoBounds.x()+drawVideoBounds.width()-hoffset, drawVideoBounds.y(), qpm);
+                }
+                if (voffset > 0) {
+                    QSize barsize = drawVideoBounds.size();
+                    barsize.setHeight(voffset);
+                    QPixmap qpm(barsize);
+                    qpm.fill(black);
+                    p->drawPixmap(drawVideoBounds.x(), drawVideoBounds.y(), qpm);
+                    p->drawPixmap(drawVideoBounds.x(), drawVideoBounds.y()+drawVideoBounds.height()-voffset, qpm);
+                }
+            }
+        }
+
+        const QImage &img = previewVideoNVP->GetARGBFrame(size);
 
-        p->drawImage(drawVideoBounds.x(), video_y, img);
+        p->drawImage(drawVideoBounds.x() + hoffset, drawVideoBounds.y() + voffset, img);
     }
 
     /* have we timed out waiting for nvp to start? */
diff -r -u -X diff.exclude myth.14823.1109a/mythtv/programs/mythfrontend/playbackbox.h myth.14826.1109a/mythtv/programs/mythfrontend/playbackbox.h
--- mythtv/programs/mythfrontend/playbackbox.h	2007-11-09 08:40:44.000000000 -0600
+++ mythtv/programs/mythfrontend/playbackbox.h	2007-11-09 18:05:31.000000000 -0600
@@ -372,6 +372,10 @@
     QRect               drawCurGroupBounds;
     QRect               drawSortOrderBounds;
 
+    // Aspect ratio cache for previews
+    float               drawVideoBoundsAspect;
+    float               previewVideoAspect;
+
     // Popup support //////////////////////////////////////////////////////////
     // General popup support
     MythPopupBox       *popup;
