diff options
author | jstebbins <[email protected]> | 2009-10-23 02:20:47 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-10-23 02:20:47 +0000 |
commit | b3fbe46e0c8282124e0b910072eb5873cb5fa05e (patch) | |
tree | 5e6b0cc0d5cdb29355e2d756e51d9351c0fc510d /libhb/reader.c | |
parent | 4784d4c2d72a0aa7366d48d3974339c12b0f65af (diff) |
fix a couple transport stream issues
when the first packet seen is audio, the stream timing for the audio
must be initialized a little different then when it follows video
add a more thorough check for duplicate packets.
a ts stream that is the result of splicing multiple clips together can
have duplicate continuity count values. usually this means that a duplicate
packet exists and the duplicate is dropped. but in the case of spliced
clips, the packet should not be dropped.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2895 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/reader.c')
-rw-r--r-- | libhb/reader.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libhb/reader.c b/libhb/reader.c index 11cb23b6f..1dda826d0 100644 --- a/libhb/reader.c +++ b/libhb/reader.c @@ -141,7 +141,10 @@ static stream_timing_t *id_to_st( hb_reader_t *r, const hb_buffer_t *buf ) } st->id = buf->id; st->average = 30.*90.; - st->last = buf->renderOffset - st->average; + if ( r->saw_video ) + st->last = buf->renderOffset - st->average; + else + st->last = -st->average; if ( ( st->is_audio = is_audio( r, buf->id ) ) != 0 ) { r->saw_audio = 1; |