summaryrefslogtreecommitdiffstats
path: root/libhb/deca52.c
diff options
context:
space:
mode:
authoreddyg <[email protected]>2007-10-08 23:33:32 +0000
committereddyg <[email protected]>2007-10-08 23:33:32 +0000
commitb3178968037a18c721a66e2669ae6f040a12196a (patch)
tree98e31e044e92fc6eff6aa7121778df45e7c53df6 /libhb/deca52.c
parent803933145cbdd7681e3dcaa0124764657ecaea4f (diff)
Don't drop subtitles when crossing PTS discontinuities by using buffer sequence numbers to determine where in the stream the buffer came from.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1011 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/deca52.c')
-rw-r--r--libhb/deca52.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libhb/deca52.c b/libhb/deca52.c
index de33b3e06..94bf8a540 100644
--- a/libhb/deca52.c
+++ b/libhb/deca52.c
@@ -27,6 +27,8 @@ struct hb_work_private_s
int64_t next_expected_pts;
+ int64_t sequence;
+
uint8_t frame[3840];
hb_list_t * list;
@@ -79,6 +81,7 @@ int deca52Init( hb_work_object_t * w, hb_job_t * job )
pv->level = 32768.0;
pv->next_expected_pts = 0;
+ pv->sequence = 0;
return 0;
}
@@ -109,13 +112,19 @@ int deca52Work( hb_work_object_t * w, hb_buffer_t ** buf_in,
hb_work_private_t * pv = w->private_data;
hb_buffer_t * buf;
+ if( buf_in && *buf_in )
+ {
+ pv->sequence = (*buf_in)->sequence;
+ }
+
hb_list_add( pv->list, *buf_in );
*buf_in = NULL;
/* If we got more than a frame, chain raw buffers */
*buf_out = buf = Decode( w );
while( buf )
- {
+ {
+ buf->sequence = pv->sequence;
buf->next = Decode( w );
buf = buf->next;
}