[vlc-devel] Re: Some bugs (+ fixes)

Derk-Jan Hartman 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:
>> 1.
>> 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)
>> or:
>> - "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 );"
>> by
>> "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 ?

DJ

Index: modules/access/dvdread.c
===================================================================
--- 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[0] == 0x00 && p_header[1] == 0x00 && p_header[2]  
== 0x01 &&
+        p_header[3] == 0xbf && p_header[6] == 0x01 ))
+        return;
+
+    i_length = p_header[4] << 8 | p_header[5];
+    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 mailing list