+ title->aspect *= (double)title->pixel_aspect_width /
+ (double)title->pixel_aspect_height;
+
+ // For unknown reasons some French PAL DVDs put the original
+ // content's aspect ratio into the mpeg PAR even though it's
+ // the wrong PAR for the DVD. Apparently they rely on the fact
+ // that DVD players ignore the content PAR and just use the
+ // aspect ratio from the DVD metadata. So, if the aspect computed
+ // from the PAR is different from the container's aspect we use
+ // the container's aspect & recompute the PAR from it.
+ if( title->container_aspect && (int)(title->aspect * 9) != (int)(title->container_aspect * 9) )
+ {
+ hb_log("scan: content PAR gives wrong aspect %.2f; "
+ "using container aspect %.2f", title->aspect,
+ title->container_aspect );
+ title->aspect = title->container_aspect;
+ hb_reduce( &title->pixel_aspect_width, &title->pixel_aspect_height,
+ (int)(title->aspect * title->height + 0.5), title->width );
+ }