Add pixel-aspect-ratio=1/1 to force the rescaling
authorAntonio Ospite <ospite@studenti.unina.it>
Tue, 5 Mar 2013 14:26:15 +0000 (15:26 +0100)
committerAntonio Ospite <ospite@studenti.unina.it>
Tue, 5 Mar 2013 14:29:52 +0000 (15:29 +0100)
gst-custom-player.py

index eef3f6b..cbeace2 100755 (executable)
@@ -45,7 +45,7 @@ class CustomVideoBin(gst.Bin):
         rescale = gst.element_factory_make("videoscale", "rescale")
         self.add(rescale)
 
-        caps = gst.Caps("video/x-raw-yuv,format=(fourcc)AYUV,width=%d,height=%d" % (WIDTH, HEIGHT))
+        caps = gst.Caps("video/x-raw-yuv,format=(fourcc)AYUV,width=%d,height=%d,pixel-aspect-ratio=1/1" % (WIDTH, HEIGHT))
         capsfilter = gst.element_factory_make("capsfilter", "filter")
         capsfilter.set_property("caps", caps)
         self.add(capsfilter)