OSDN Git Service

Fix two of my stupid bugs that prevented using the queue with transport streams:
authorvan <van@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 20 Mar 2008 05:28:36 +0000 (05:28 +0000)
committervan <van@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Thu, 20 Mar 2008 05:28:36 +0000 (05:28 +0000)
commit54052b800c3e291a2803240254eff821fcea0884
tree9b690a5bcbf2727590bdf5be6eb33ce79ea52d47
parent4e3f08663b249ff5604e4de3878a226b21f342dc
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://localhost/HandBrake/trunk@1351 b64f7644-9d1e-0410-96f1-a4d463321fa5
libhb/internal.h
libhb/reader.c
libhb/scan.c
libhb/stream.c