]> granicus.if.org Git - handbrake/commitdiff
Signal anamorphic in the MP4 container though the pixel aspect atom as well as the...
authorjbrjake <jb.rubin@gmail.com>
Sun, 17 Feb 2008 06:15:29 +0000 (06:15 +0000)
committerjbrjake <jb.rubin@gmail.com>
Sun, 17 Feb 2008 06:15:29 +0000 (06:15 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1278 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/muxmp4.c

index ff30bd9fe148cc8cf6fab3caee8a9489179fb0b9..3f043dbddd516a9dab2958750131a1f4e2b5e911 100644 (file)
@@ -232,10 +232,21 @@ static int MP4Init( hb_mux_object_t * m )
         }
     }
 
-       /* apply the anamorphic transformation matrix if needed */
+    if( job->pixel_ratio )
+    {
+        /* PASP atom for anamorphic video */
+        float width, height;
 
-       if( job->pixel_ratio ) {
+        width = job->pixel_aspect_width;
 
+        height = job->pixel_aspect_height;
+        
+        MP4AddPixelAspectRatio(m->file, mux_data->track, (uint32_t)width, (uint32_t)height);
+    }
+
+
+       if( job->pixel_ratio ) {
+           /* apply the anamorphic transformation matrix as well */
                uint8_t* val;
                uint8_t nval[38];
                uint32_t *ptr32 = (uint32_t*) (nval + 2);