Also available as http://c133.org/tmp/libhb-dvd.diff - I have some other HandBrake patches to enable anamorphic output - preserving the original MPEG2 frame size and also the aspect ratio headers so that the output file is still (for NTSC, anyway) 720x480, but displays at 854x480 or 720x540. Anybody interested in those?
Code: Select all
Index: libhb/dvd.c
===================================================================
--- libhb/dvd.c (revision 69)
+++ libhb/dvd.c (working copy)
@@ -607,7 +607,19 @@
return 1;
}
+
/***********************************************************************
+ * is_nav_pack
+ ***********************************************************************
+ * Pretty much directly lifted from libdvdread's play_title function.
+ **********************************************************************/
+int is_nav_pack( unsigned char *buf )
+{
+ return ( buf[41] == 0xbf && buf[1027] == 0xbf );
+}
+
+
+/***********************************************************************
* hb_dvd_read
***********************************************************************
*
@@ -632,6 +644,11 @@
return 0;
}
+ if ( !is_nav_pack( b->data ) ) {
+ (d->next_vobu)++;
+ continue;
+ }
+
navRead_DSI( &dsi_pack, &b->data[DSI_START_BYTE] );
block = dsi_pack.dsi_gi.nv_pck_lbn;