diff options
author | van <[email protected]> | 2008-03-20 05:28:36 +0000 |
---|---|---|
committer | van <[email protected]> | 2008-03-20 05:28:36 +0000 |
commit | 5265ea2db4fb71b3b894c16b830783091b34129a (patch) | |
tree | 9b690a5bcbf2727590bdf5be6eb33ce79ea52d47 /libhb/reader.c | |
parent | 3a3870d7ea1e81e1a145b1d555b9f0164860f9e3 (diff) |
Fix two of my stupid bugs that prevented using the queue with transport streams:
- keep a cache of the pid/substream id mappings from each scan rather than assuming an encode will immediately follow a scan (there will be lots of scans followed by lots of encodes when the queue is used).
- rewrite a few things to get rid of static variables. hb_ts_stream_decode is called by both scan & reader and they're in different threads. All the working storage & state has to either be in the stream struct or on the stack so it's private to the calling thread or it gets corrupted when doing a scan in the middle of an encode.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1351 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/reader.c')
-rw-r--r-- | libhb/reader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libhb/reader.c b/libhb/reader.c index b2bff03ef..db1c7af72 100644 --- a/libhb/reader.c +++ b/libhb/reader.c @@ -68,7 +68,7 @@ static void ReaderFunc( void * _r ) if( !( r->dvd = hb_dvd_init( r->title->dvd ) ) ) { - if ( !(r->stream = hb_stream_open(r->title->dvd) ) ) + if ( !( r->stream = hb_stream_open( r->title->dvd, 1 ) ) ) { return; } @@ -212,7 +212,7 @@ static void ReaderFunc( void * _r ) * new packet lines up with that of the previous packet. */ int64_t scr_delta = buf->stop - r->last_scr; - if ( scr_delta > 67500 || scr_delta < -900 ) + if ( scr_delta > (90*700) || scr_delta < -90 ) { ++r->scr_changes; r->scr_offset += scr_delta - 1; |