OSDN Git Service

Another minor step on the way back to Solaris compiles - not linking as yet.
[handbrake-jp/handbrake-jp-git.git] / libhb / muxmp4.c
index 0069716..3f9b231 100644 (file)
@@ -183,14 +183,14 @@ static int MP4Init( hb_mux_object_t * m )
         MP4AddColr(m->file, mux_data->track, 6, 1, 6);
     }
 
-    if( job->pixel_ratio )
+    if( job->anamorphic.mode )
     {
         /* PASP atom for anamorphic video */
         float width, height;
 
-        width = job->pixel_aspect_width;
+        width  = job->anamorphic.par_width;
 
-        height = job->pixel_aspect_height;
+        height = job->anamorphic.par_height;
 
         MP4AddPixelAspectRatio(m->file, mux_data->track, (uint32_t)width, (uint32_t)height);
 
@@ -390,7 +390,7 @@ static int MP4Init( hb_mux_object_t * m )
     /* Add encoded-by metadata listing version and build date */
     char *tool_string;
     tool_string = (char *)malloc(80);
-    snprintf( tool_string, 80, "HandBrake %s %i", HB_VERSION, HB_BUILD);
+    snprintf( tool_string, 80, "HandBrake %s %i", HB_PROJECT_VERSION, HB_PROJECT_BUILD);
     MP4SetMetadataTool(m->file, tool_string);
     free(tool_string);
 
@@ -492,7 +492,8 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data,
                          buf->size,
                          duration,
                          offset,
-                         ((buf->frametype & HB_FRAME_KEY) != 0) ) )
+                         ( job->vcodec == HB_VCODEC_X264 && mux_data == job->mux_data ) ?
+                            ( buf->frametype == HB_FRAME_IDR ) : ( ( buf->frametype & HB_FRAME_KEY ) != 0 ) ) )
     {
         hb_error("Failed to write to output file, disk full?");
         *job->die = 1;