| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
After finding the start position, some data prior to the start from
other streams could leak through causing duplicate timestamps in the
output.
Also, improves alignment of stop times of all streams when a stop time
is set.
|
|
|
|
|
|
| |
It was dropping subtitles because the "end of CC" marker buffer can have
the same time as the next valid CC which triggered the subtitle overlap
dropping code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sync: correct timestamp discontinuities in sync instead of reader
This patch passes discontinuity information through the pipeline till it
reaches sync.c. The timestamps are passed through the pipeline as read
and unmodified to sync.c (instead of attempting to correct
discontinuities in reader). In sync, when we see a discontinuity,
we know where the next timestamp should be based on the timestamp
and duration of the previous buffer (before the discontinuity). So
we calculate an "SCR" offset based on the timestamp after the
discontinuity and what we calculate it should be.
The old discontinuity handling code was broken due to the following.
The MPEG STD timing model relies heavily on the decoder having an STC
that is phase lock looped to the PCRs in the stream. When decoding a
broadcast stream, the decoder can count on the time measure between PCRs
using the STC to match to a high degree of accuracy.
I.e. STC - lastSTC == PCR - lastPCR. When a discontinuity occurs, the
decoder calculates a new PCR offset = PCR - STC. I.e. the offset is the
new PCR value minus what it would have been if there had been no
discontinuity.
The above does not work without a reliable STC, which we do not have.
We have been attempting to approximate one by avereraging the duration
of received packets and extrapolating an "STC" based on the last PTS and
the average packet duration. But this is highly variable and
unreliable.
* decavcodec: fix data type of next_pts
It needs to be double so that partial ticks are not lost
* deccc608sub: clarify comment
* sync: allow queueing more audio
Audio is small, and there is often a significant amount of audio in the
stream before the first video frame.
* sync: improve handling of damaged streams
When data is missing, the audio decoder was extrapolating timestamps
from the last pts before the error caused by the missing data which
caused sync issues.
Also, missing data can cause the video decoder to output a frame out of
order with the wrong scr sequence. Drop such frames.
|
|
|
|
|
|
| |
essentially an off-by-one error. OutputBuffer had to wait for one more
buffer before any output was performed after the queue should have
already been filled to it's minimum levels.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It's not strictly necessary because it gets done elsewhere as well. But
putting it here makes the code more understandable.
|
| |
|
| |
|
|
|
|
|
| |
... by allowing a deeper initial buffer when looking for the fist PTS of
each stream.
|
|
|
|
| |
... at log level 11 ;)
|
| |
|
|
|
|
|
|
|
| |
We were dropping all buffers before the start frame was found regardless
of the buffers start time. Now we keep track of the start time of the
last video frame seen and only drop buffers that start before that
frame.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
since sync interleaves it's output by PTS, the stream of the incoming
buffer is mostly not the same as the stream of the outgoing buffer. This
causes a delay in the data to get to it's respective fifo until the sync
work function for the output stream is called next. Writing directly to
the output fifo fixes this.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
If the entire stream fits in the sync queues, the first PTS was not
detected and initial offsets were not applied.
|
|
|
|
|
| |
The way the constant is defined requires an (int64_t) cast to force it
to be signed.
|
| |
|
|
|
|
|
|
| |
When more than 2 subtitles overlapped in time, they were not merged
properly and could result in cases where the subtitle time went
backwards
|
| |
|
| |
|
|
|
|
|
| |
If there are no more subtitles in a subtitle track after the stop time
of a p-to-p encoding, the encode would never finish.
|
|
|
|
|
|
| |
subtitle stop time was getting incorrectly squashed when special
value AV_NOPTS_VALUE. it should have been set to the next subtitles
start time.
|
|
|
|
|
| |
Under some discontinuity cases, these markers were getting passed
through to the muxer, which caused a crash.
|
|
|
|
|
| |
Found a sample that requires 12 frames to detect and fix video jitter.
So extend the minimum frame buffer from 10 to 12.
|
| |
|
|
|
|
|
| |
This should be really difficult to trigger, but someone found a sample
that does.
|
|
|
|
|
| |
if there are no subtitles in the file, our check that would terminate
the subtitle scan pass does not get executed.
|
|
|
|
| |
sync was delaying delivery of subtitles which caused burn-in late.
|
|
|
|
| |
Failed to pass along EOF buffer.
|
|
|
|
|
|
|
|
|
|
|
| |
sync.c was difficult to read, fragile, and prone to difficult to
diagnose bugs (see
https://forum.handbrake.fr/viewtopic.php?f=12&t=33147)
This rewrite simplifies the code, removes signals, locking and yield
that probably cause the above problem and is much more flexible. It
fixes a wider variety of timestamp issues than before and is much easier
to extend if other timestamp analysis is desired.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
simplify job initialization sequence, clean up code, and document
dependencies in the sequence better.
Make hb_add set job->sequence_id. It is no longer necessary for the
frontend to do this. If the frontend needs the sequence_id, it is
returned by hb_add().
Clean up use of interjob. do_job() now uses sequence_id to detect when
a new sequence of related jobs is running and automatically clears
interjob.
|
|
|
|
|
| |
This brings together several independent implementations of a simple
buffer list manager.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The default chapter start or end was used if one but not the other of
start-at/stop-at were used.
Also don't overwrite current pass and pass_count status in hb_state_t
while searching for the position to start encoding.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7177 b64f7644-9d1e-0410-96f1-a4d463321fa5
|
|
|
|
|
|
|
|
|
|
|
|
| |
... instead of a 0 length buffer.
This fixes this issue:
https://forum.handbrake.fr/viewtopic.php?f=12&t=31959
Theora can create 0 length output. These 0 length frames indicate
duplicate frames. So we can't use 0 length buffers to indicate the end
of the stream.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7143 b64f7644-9d1e-0410-96f1-a4d463321fa5
|