ref: caf62fa7aa6cbf240e723a80031e0a0ece10c0ae
parent: 35589cea2e9e39e5d65d2a2b146ea11bd0e65da6
author: Adam Jones <adam@yggdrasl.demon.co.uk>
date: Mon Jul 1 09:40:33 EDT 2002
Typo fix and fix the linked list code to not drop the list when instering at the head.
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -2,7 +2,7 @@
* libdvdcss.c: DVD reading library.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: libdvdcss.c,v 1.11 2002/06/04 07:02:57 sam Exp $
+ * $Id: libdvdcss.c,v 1.12 2002/07/01 13:40:33 hjort Exp $
*
* Authors: St�phane Borel <stef@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
@@ -337,7 +337,7 @@
}
else if( i_ret == 0 )
{
- _dvdcss_debug( dvdcss, "unecrypted title" );
+ _dvdcss_debug( dvdcss, "unencrypted title" );
/* Still store this in the cache, so we don't need to check again. */
}
@@ -358,12 +358,13 @@
p_newtitle->i_startlb = i_block;
memcpy( p_newtitle->p_key, p_title_key, KEY_SIZE );
- /* Link the new title, either at the beginning or inside the list */
+ /* Link it at the head of the (possibly empty) list */
if( p_title == NULL )
{
+ p_newtitle->p_next = dvdcss->p_titles;
dvdcss->p_titles = p_newtitle;
- p_newtitle->p_next = NULL;
}
+ /* Link the new title inside the list */
else
{
p_newtitle->p_next = p_title->p_next;