summaryrefslogtreecommitdiffstats
path: root/libhb/sync.c
Commit message (Collapse)AuthorAgeFilesLines
...
* sync: fix hang at end of p-to-p encoding with subtitlesJohn Stebbins2016-03-111-1/+8
| | | | | 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.
* sync: fix yet another subtitle issue.John Stebbins2016-03-111-1/+2
| | | | | | subtitle stop time was getting incorrectly squashed when special value AV_NOPTS_VALUE. it should have been set to the next subtitles start time.
* sync: fix handling of end-of-subtitle markersJohn Stebbins2016-03-061-0/+4
| | | | | Under some discontinuity cases, these markers were getting passed through to the muxer, which caused a crash.
* sync: improve video dejitterJohn Stebbins2016-02-151-1/+1
| | | | | Found a sample that requires 12 frames to detect and fix video jitter. So extend the minimum frame buffer from 10 to 12.
* sync: fix crash when sync init failsJohn Stebbins2016-02-121-1/+2
|
* sync: fix subtitle timestamps that go backwardsJohn Stebbins2016-02-101-3/+22
| | | | | This should be really difficult to trigger, but someone found a sample that does.
* sync: fix hang in subtitle scan passJohn Stebbins2016-01-271-0/+9
| | | | | if there are no subtitles in the file, our check that would terminate the subtitle scan pass does not get executed.
* sync: fix delayed subtitles when burned-inJohn Stebbins2016-01-271-0/+14
| | | | sync was delaying delivery of subtitles which caused burn-in late.
* sync: fix hang in ssa subtitle syncJohn Stebbins2016-01-211-1/+5
| | | | Failed to pass along EOF buffer.
* sync: gut and rewriteJohn Stebbins2016-01-211-1201/+1615
| | | | | | | | | | | 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.
* libhb: fix hang during subtitle scanJohn Stebbins2016-01-191-0/+6
|
* sync: fix typo that could result in dropping subtitlesJohn Stebbins2016-01-151-1/+1
|
* Update copyright dates to 2016.Bradley Sepos2016-01-011-1/+1
|
* libhb: use LL for int64 constants to make mingw happyJohn Stebbins2015-12-261-1/+1
|
* libhb: make muxer, sync, and reader behave like other work objectsJohn Stebbins2015-11-091-46/+33
| | | | | | | | | | | | | 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.
* libhb: add hb_buffer_listJohn Stebbins2015-09-241-79/+46
| | | | | This brings together several independent implementations of a simple buffer list manager.
* libhb: remove unused hb_buffer_t.subJohn Stebbins2015-09-041-1/+0
|
* cli: fix initialization of encode rangesjstebbins2015-05-131-0/+2
| | | | | | | | | | | 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
* libhb: Use a buffer flat to indicate EOFjstebbins2015-05-011-8/+8
| | | | | | | | | | | | ... 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
* sync: fix frame p-to-p extra audio after end framejstebbins2015-04-221-326/+249
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7119 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Eliminate global variable hb_gui_use_hwd_flagjstebbins2015-03-291-2/+2
| | | | | | | | | | | | This global was shared between the CLI and libhb and used as a back door to force scan and encode passes to use the same ffmpeg context for hardware decoding. Aside from the fact that this context sharing should not be necessary and needs fixing, this information belongs in the hb_handle_t that is shared between the scan and the encode. So put it there and make sure the hb_handle_t get propagated to where the flag is needed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7028 b64f7644-9d1e-0410-96f1-a4d463321fa5
* json: automatically scan title when processing json jobsjstebbins2015-03-071-2/+3
| | | | | | | | | | | | | | | Simplifies the WinGui. This also changes how jobs are processed. Creating the sub-jobs for multiple passes is delayed until after scanning and immediately before running the job. Working status has also changed. Sub-job passes are identified in status with an ID that allows the frontend to definitively identify what pass is in progress. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6976 b64f7644-9d1e-0410-96f1-a4d463321fa5
* New audio output options.Rodeo2015-02-151-8/+88
| | | | | | | | | Dolby Digital Plus (E-AC-3), Dolby TrueHD and FLAC can now be passed through without re-encoding. They aren't covered by Auto Passthru yet, however. In addition, encoding to E-AC-3 is now possible. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6908 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update year to 2015.bradleys2015-02-011-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6852 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: separate the video settings logic from the view controller. There ↵ritsuka2014-12-181-0/+1
| | | | | | are a number of small regression ("Custom" preset and auto naming not updating) that will be fixed in the next commits. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6606 b64f7644-9d1e-0410-96f1-a4d463321fa5
* json: add json APIsjstebbins2014-12-161-3/+4
| | | | | | | | | | There are several changes to job and title structs that break current windows interop code. The interop code should be changed such that it only uses json APIs. So if there is any missing features (or bugs) in these APIs, please let me know. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6602 b64f7644-9d1e-0410-96f1-a4d463321fa5
* sync: fix another issue with overlapping ssa subtitle translation to tx3gjstebbins2014-12-151-7/+15
| | | | | | | It was failing if 3 or more subtitles overlapped simultaneously. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6600 b64f7644-9d1e-0410-96f1-a4d463321fa5
* sync: fix dropping of subtitles caused by my previous commitjstebbins2014-12-051-0/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6588 b64f7644-9d1e-0410-96f1-a4d463321fa5
* sync: fix a problem with overlapping ssa in mp4jstebbins2014-12-041-0/+11
| | | | | | | | If an SSA starts before and ends after the subsequent SSA, the subtitles were improperly merged resulting in timestamp issues. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6584 b64f7644-9d1e-0410-96f1-a4d463321fa5
* sync: fix subtitle buffer leakjstebbins2014-10-301-0/+5
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6482 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix merging of ssa subtitlesjstebbins2014-08-271-6/+34
| | | | | | | | mergeSubtitle was originally written for pure text subs. But now the subtitle buffers have extra ssa formatting that needs different treatment. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6374 b64f7644-9d1e-0410-96f1-a4d463321fa5
* pgssubs: fix pgs passthrujstebbins2014-04-061-2/+18
| | | | | | | Subtitles were being dropped because of the new condition I added that drops subtitles when start == end. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6152 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: enable burn-in of all supported text subtitle formatsjstebbins2014-03-301-5/+14
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6141 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update some copyright dates to 2014.Rodeo2014-02-181-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6042 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Replace invaled timestamp flag "-1" with AV_NOPTSjstebbins2014-01-261-9/+9
| | | | | | | | | -1 is not a good value as a flag for invalid timestamps. There are cases where small negative timestamps are useful. So this eliminates a potential ambiguity. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6001 b64f7644-9d1e-0410-96f1-a4d463321fa5
* sync: fix previous commit.Rodeo2013-12-051-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5920 b64f7644-9d1e-0410-96f1-a4d463321fa5
* sync: find the AAC encoder by name.Rodeo2013-12-051-1/+1
| | | | | | | FDK is non-experimental, so if it's compiled in, it will be selected over the libavcodec encoder, which is what we want to use for consistency (quality hardly matters when encoding silence). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5919 b64f7644-9d1e-0410-96f1-a4d463321fa5
* sync: use "drop video to sync" fallback also when audio encoding fails or we ↵Rodeo2013-12-051-1/+9
| | | | | | do not get an output packet after 10 tries. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5918 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix double hb_buffer_closejstebbins2013-10-281-1/+0
| | | | | | | Don't close a list of buffers then also close the last item in the list :-\ git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5861 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Plug some leaks and clean up the buffer pool code a little.jstebbins2013-10-231-0/+14
| | | | | | | | | | | Filters were leaking buffers when a job is cancelled. decavcodec could leak when job cancelled. decavcodec leaked audio extradata in BSInfo encavcodec and encavcodecaudio leaked AVCodecContext sync leaked subtitle_sanitizer_t data git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5853 b64f7644-9d1e-0410-96f1-a4d463321fa5
* QSV: minor refactoring.Rodeo2013-09-151-6/+10
| | | | | | | | | | Address the easy issues first. Apologies if I broke HandBrakeInterop. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5783 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Big merge, QSV to trunk: part 1 (tracked files).Rodeo2013-08-221-0/+44
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5737 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: handle zero length EOF subtitle properlyjstebbins2013-07-061-3/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5636 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix a couple of problems with subtitle mergingjstebbins2013-07-061-11/+29
| | | | | | | | | | I did not handle cases where it was impossible to determine the stop time properly. I also did not handle the last subitle properly. It would have been lost. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5635 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: improve handling of overlapping text subtitlesjstebbins2013-07-011-53/+177
| | | | | | | | | mp4 timed text does not support subtitles that overlap (in time). So this patch detects these overlaps and merges subtitles when appropriate. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5632 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add experimental avformat muxer for mkv and mp4jstebbins2013-06-301-10/+42
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5620 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix hang that can occur under certain error conditionsjstebbins2013-06-161-4/+4
| | | | | | | | | audio and video sync are in wait loops when they first start. if an error happens during this period, the hang would happen. check w->done in these loops to break out in case of error. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5592 b64f7644-9d1e-0410-96f1-a4d463321fa5
* sync: fall back to drop_video_to_sync when hb_avcodec_open() fails, instesd ↵Rodeo2013-05-171-39/+41
| | | | | | | | | | of killing the job. Patch by John Stebbins. Thanks! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5459 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix crash when EOF is found before first video framejstebbins2013-04-301-0/+1
| | | | | | | buffer got closed twice, once in sync close and once in muxer. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5430 b64f7644-9d1e-0410-96f1-a4d463321fa5
* sync: fix a hang when the avcodec encoder for silence insertion fails to open.Rodeo2013-04-281-2/+3
| | | | | | | | This affects e.g. AAC Passthru with more than 6 channels. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5423 b64f7644-9d1e-0410-96f1-a4d463321fa5