[vlc-devel] Re: Some bugs (+ fixes)
hartman at videolan.org
Mon Feb 20 16:09:01 CET 2006
On 20-feb-2006, at 14:47, Derk-Jan Hartman wrote:
> On 19-feb-2006, at 16:29, Hans-Peter Fischer wrote:
>> Movie stops in the middle of last chapter. Example: Artificial Eye
>> DVD "Ivan's Childhood".
>> Error messages:
>> - "dsi->dsi_gi.zero1 == 0" (from libdvdread) and "i_pack_len >=
>> 1024" (from vlc's dvdread access module)
>> - "Expected NAV packet but none found." (when using libdvdnav only)
>> My solution:
>> In modules/access/dvdread.c, line 1151, replace
>> "p_sys->i_next_vobu = p_sys->i_cur_block +
>> ( p_sys->dsi_pack.vobu_sri.next_vobu & 0x7fffffff );"
>> "p_sys->i_next_vobu = p_sys->i_cur_block + p_sys->i_pack_len + 1;"
> There is a deeper issue here. It seems as if a packet was
> encountered was handled as a DSI, but actually is something else.
> It's hard to check without having the actual DVD I fear. You are
> definitely not the first one to run into it, and the issue isn't
> VLC specific either, but I'm weary to making a "work around" for
> something that I don't understand. The issue should be fixed at the
> libdvdread level, and should be fixed properly.
I digged a bit deeper, and I noticed that none of the systems
actually CHECK if they are at a DSI packet before reading it. Perhaps
the DSI isn't obligatory in some cases, or shortened ?
Could you try dvdread module with your DVD and see if the changes
below make any difference ?
--- modules/access/dvdread.c (revision 14411)
+++ modules/access/dvdread.c (working copy)
@@ -1124,6 +1124,15 @@
demux_sys_t *p_sys = p_demux->p_sys;
+ int i_length = 0;
+ uint8_t *p_header = &p_data[DSI_START_BYTE - 7];
+ if( !(p_header == 0x00 && p_header == 0x00 && p_header
== 0x01 &&
+ p_header == 0xbf && p_header == 0x01 ))
+ i_length = p_header << 8 | p_header;
+ if( i_length < 0x20 ) return;
navRead_DSI( &p_sys->dsi_pack, &p_data[DSI_START_BYTE] );
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel