summaryrefslogtreecommitdiffstats
path: root/libhb/sync.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2018-05-30 09:21:56 -0700
committerJohn Stebbins <[email protected]>2018-05-30 09:27:37 -0700
commit6a9a25943dfea697a393ca8bf9e1eb3bce8f88f7 (patch)
tree09ac841501aeb1d7f4f961cf3508465ce68fd4cd /libhb/sync.c
parent49f21c9596d91e742f2b2f4a5d5623f6c73ad506 (diff)
encx264: fix encoding of very short duration frames
We had a hash of limited size where we stored frame durations in encx264. This hash has not been necessary since we moved to using libavformat for muxing. Since the limited size of the hash put constraints on how short frame durations could be, I've eliminated it. This means that after the encoder, hb_buffer_t s.stop and s.duration are no longer valid. But since they are not used during muxing, this is not a problem. Fixes https://github.com/HandBrake/HandBrake/issues/1374
Diffstat (limited to 'libhb/sync.c')
-rw-r--r--libhb/sync.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libhb/sync.c b/libhb/sync.c
index f0b1b9abc..639baad46 100644
--- a/libhb/sync.c
+++ b/libhb/sync.c
@@ -1264,8 +1264,7 @@ static void streamFlush( sync_stream_t * stream )
{
stream->max_frame_duration = buf->s.duration;
}
- if ((buf->s.start < 0) ||
- (stream->type == SYNC_TYPE_VIDEO && buf->s.duration < 256))
+ if (buf->s.start < 0)
{
// The pipeline can't handle negative timestamps
// and it is sometimes not possible to avoid one
@@ -1275,9 +1274,6 @@ static void streamFlush( sync_stream_t * stream )
// until we have seen the first PTS for all streams
// so sometimes we may start before we have seen
// the earliest PTS
- //
- // Also, encx264.c can't handle timestamps that are spaced
- // less than 256 ticks apart.
saveChap(stream, buf);
hb_buffer_close(&buf);
}