diff options
author | jstebbins <[email protected]> | 2015-04-22 21:12:21 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2015-04-22 21:12:21 +0000 |
commit | ddcecd907b532f867a5c7a1aa89ea6909205caab (patch) | |
tree | 3c2deafb87344c300243f11609366998c3d246be /libhb/bd.c | |
parent | c48e55d5563dc05aed1652a34bc5359376aed2a7 (diff) |
stream: Improve transport stream PCR handling
When a new PCR is seen, emit all currently cached data. This prevents
data that was referenced to the previous PCR from being associated with
the new PCR.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7120 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/bd.c')
-rw-r--r-- | libhb/bd.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libhb/bd.c b/libhb/bd.c index abe13fa5d..86a956675 100644 --- a/libhb/bd.c +++ b/libhb/bd.c @@ -698,7 +698,7 @@ hb_buffer_t * hb_bd_read( hb_bd_t * d ) uint8_t buf[192]; BD_EVENT event; uint64_t pos; - hb_buffer_t * b; + hb_buffer_t * out = NULL; uint8_t discontinuity; int new_chap = 0; @@ -753,13 +753,9 @@ hb_buffer_t * hb_bd_read( hb_bd_t * d ) } } // buf+4 to skip the BD timestamp at start of packet - b = hb_ts_decode_pkt( d->stream, buf+4 ); - if ( b ) - { - b->s.discontinuity = discontinuity; - b->s.new_chap = new_chap; - return b; - } + out = hb_ts_decode_pkt( d->stream, buf+4, new_chap, discontinuity ); + if (out != NULL) + return out; } return NULL; } |