summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorhandbrake <[email protected]>2006-01-14 13:48:48 +0000
committerhandbrake <[email protected]>2006-01-14 13:48:48 +0000
commit9b1acf8cda6d2c5c53000595a6192237e0ed339f (patch)
tree117605ae091e4507d556b1256f7a69fb193da3f6 /libhb
parent56bb6ce496b475944bb9577c7586e84be1cb831e (diff)
Update 2006-01-10
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@17 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/dvd.c33
-rw-r--r--libhb/internal.h3
-rw-r--r--libhb/reader.c3
-rw-r--r--libhb/scan.c3
4 files changed, 34 insertions, 8 deletions
diff --git a/libhb/dvd.c b/libhb/dvd.c
index 9b2aef13b..3888f41db 100644
--- a/libhb/dvd.c
+++ b/libhb/dvd.c
@@ -1,4 +1,4 @@
-/* $Id: dvd.c,v 1.11 2005/11/04 15:30:47 titer Exp $
+/* $Id: dvd.c,v 1.12 2005/11/25 15:05:25 titer Exp $
This file is part of the HandBrake source code.
Homepage: <http://handbrake.m0k.org/>.
@@ -511,6 +511,25 @@ int hb_dvd_start( hb_dvd_t * d, int title, int chapter )
}
/***********************************************************************
+ * hb_dvd_stop
+ ***********************************************************************
+ *
+ **********************************************************************/
+void hb_dvd_stop( hb_dvd_t * d )
+{
+ if( d->ifo )
+ {
+ ifoClose( d->ifo );
+ d->ifo = NULL;
+ }
+ if( d->file )
+ {
+ DVDCloseFile( d->file );
+ d->file = NULL;
+ }
+}
+
+/***********************************************************************
* hb_dvd_seek
***********************************************************************
*
@@ -675,10 +694,14 @@ void hb_dvd_close( hb_dvd_t ** _d )
{
hb_dvd_t * d = *_d;
- if( d->ifo ) ifoClose( d->ifo );
- if( d->vmg ) ifoClose( d->vmg );
- if( d->file ) DVDCloseFile( d->file );
- if( d->reader ) DVDClose( d->reader );
+ if( d->vmg )
+ {
+ ifoClose( d->vmg );
+ }
+ if( d->reader )
+ {
+ DVDClose( d->reader );
+ }
free( d );
*_d = NULL;
diff --git a/libhb/internal.h b/libhb/internal.h
index e22da82ee..02fb61578 100644
--- a/libhb/internal.h
+++ b/libhb/internal.h
@@ -1,4 +1,4 @@
-/* $Id: internal.h,v 1.40 2005/04/27 10:14:02 titer Exp $
+/* $Id: internal.h,v 1.41 2005/11/25 15:05:25 titer Exp $
This file is part of the HandBrake source code.
Homepage: <http://handbrake.m0k.org/>.
@@ -104,6 +104,7 @@ hb_dvd_t * hb_dvd_init( char * path );
int hb_dvd_title_count( hb_dvd_t * );
hb_title_t * hb_dvd_title_scan( hb_dvd_t *, int title );
int hb_dvd_start( hb_dvd_t *, int title, int chapter );
+void hb_dvd_stop( hb_dvd_t * );
int hb_dvd_seek( hb_dvd_t *, float );
int hb_dvd_read( hb_dvd_t *, hb_buffer_t * );
int hb_dvd_chapter( hb_dvd_t * );
diff --git a/libhb/reader.c b/libhb/reader.c
index e57467d8d..47ec9d546 100644
--- a/libhb/reader.c
+++ b/libhb/reader.c
@@ -1,4 +1,4 @@
-/* $Id: reader.c,v 1.20 2005/04/29 19:55:54 titer Exp $
+/* $Id: reader.c,v 1.21 2005/11/25 15:05:25 titer Exp $
This file is part of the HandBrake source code.
Homepage: <http://handbrake.m0k.org/>.
@@ -113,6 +113,7 @@ static void ReaderFunc( void * _r )
hb_list_empty( &list );
hb_buffer_close( &r->ps );
+ hb_dvd_stop( r->dvd );
hb_dvd_close( &r->dvd );
hb_log( "reader: done" );
diff --git a/libhb/scan.c b/libhb/scan.c
index 812e84026..f60392cea 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -1,4 +1,4 @@
-/* $Id: scan.c,v 1.51 2005/04/27 21:05:24 titer Exp $
+/* $Id: scan.c,v 1.52 2005/11/25 15:05:25 titer Exp $
This file is part of the HandBrake source code.
Homepage: <http://handbrake.m0k.org/>.
@@ -397,6 +397,7 @@ cleanup:
hb_buffer_close( &buf_raw );
}
hb_list_close( &list_raw );
+ hb_dvd_stop( data->dvd );
return ret;
}