WinGui: Fix an issue that was causing the app to erroneously create a "HandBrake Team" folder under the users "Roaming" folder. This also now displays the correct directory under the Log "Data Dir" line.
John Stebbins [Thu, 12 Jul 2018 22:22:06 +0000 (15:22 -0700)]
LinGui: fix queue reload in flatpak sandbox
Queues are tied to the PID of the process that wrote them. But
the app runs with the same PID in the sandbox on every invocation. So
the new pid file must be written after processing any previous queue.
WinGui: Simplify the Deinterlace / Decomb / Interlace Detection Tab and associated code. Tweak the layout of the deinterlace controls to match the Mac/Linux UI's. Pull Presets from libhb.
Frederick Ding [Wed, 4 Jul 2018 21:09:25 +0000 (17:09 -0400)]
Specify flatpak branch when building the bundle
Fixes a bug introduced in 70a0ad3b0088f86fa26e3f8fe9006834155c7d4d. Branch must be either `development` or `stable`, can't rely on defaults. See http://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak-build-bundle for CLI reference.
John Stebbins [Wed, 27 Jun 2018 18:06:02 +0000 (11:06 -0700)]
presets: fix importing file with "Official" presets
Convert any presets with "Type" official to custom before importing.
This can happen if someone decides to try to import a full user presets
file from a previous install of HandBrake.
- avcodec/aacdec_fixed: Fix undefined integer overflow in apply_independent_coupling_fixed()
- avcodec/dirac_dwt_template: Fix undefined behavior in interleave()
- avutil/common: Fix undefined behavior in av_clip_uintp2_c()
- fftools/ffmpeg: Fallback to duration if sample rate is unavailable
- avformat/mov: Only set pkt->duration to non negative values
- avcodec/mpeg4videodec: Clear bits_per_raw_sample if it has originated from a previous instance
- avformat/movenc: fix recognization of cover image streams
- avformat/movenc: properly handle cover image codecs
- avcodec/h264_slice: Fix overflow in recovery_frame computation
- avcodec/h264_ps: Move MAX_LOG2_MAX_FRAME_NUM to header so it can be used in h264_sei
- avcodec/h264_mc_template: Only prefetch motion if the list is used.
- avcodec/xwddec: Use ff_set_dimensions()
- avcodec/wavpack: Fix overflow in adding tail
- avcodec/shorten: Fix multiple integer overflows
- avcodec/shorten: Fix undefined shift in fix_bitshift()
- avcodec/shorten: Fix a negative left shift in shorten_decode_frame()
- avcodec/shorten: Sanity check nmeans
- avcodec/shorten: Check non COMM chunk len before skip in decode_aiff_header()
- avcodec/mjpegdec: Fix integer overflow in ljpeg_decode_rgb_scan()
- avcodec/truemotion2: Fix overflow in tm2_apply_deltas()
- avcodec/opus_silk: Change silk_lsf2lpc() slightly toward silk/NLSF2A.c
- avcodec/amrwbdec: Fix division by 0 in find_hb_gain()
- avcodec/h263dec: Reinitialize idct context if it has not been setup for the active profile
- avcodec/idctdsp: Clear idct/idct_add for studio profile
- avformat/mov: replace a value error by clipping into valid range in mov_read_stsc()
- avformat/bintext: Reduce detection for random .bin files as it more likely is not a multimedia related file
- avformat/mov: Break out early if chunk_count is 0 in mov_build_index()
- avcodec/fic: Avoid some magic numbers related to cursors
- avcodec/mpeg4video: Detect reference studio streams as studio streams
- avcodec/mpeg4videodec: Do not corrupt bits_per_raw_sample
- avcodec/mpeg4videode: Eliminate out of loop VOP startcode reading for studio profile
- avcodec/g2meet: ask for sample with overflowing RGB
- avcodec/idctdsp: Transmit studio_profile to init instead of using AVCodecContext profile
- avcodec/ac3dec: Check that the number of channels with dependant streams is valid
- avcodec/ac3dec: Fix null pointer dereference in ac3_decode_frame()
- avcodec/aacdec_fixed: use 64bit to avoid overflow in rounding in apply_dependent_coupling_fixed()
- oavcodec/aacpsdsp_template: Use unsigned for hs0X to prevent undefined behavior
- avcodec/g723_1dec: Clip bits2 in both directions
- avcodec/mpeg4videoenc: Use 64 bit for times in mpeg4_encode_gop_header()
- avcodec/mlpdec: Only change noise_type if the related fields are valid
- indeo4: Decode all or nothing of a band header.
- avcodec/ac3dec: Use frame_size if superframe_size is 0
- avformat/mov: Only fail for STCO/STSC contradictions if both exist
- avcodec/dirac_dwt: Fix integer overflow in COMPOSE_DD97iH0 / COMPOSE_DD137iL0
- avcodec/fic: Check available input space for cursor
- avcodec/mpeg4videodec: Check bps (VOL header) before VOP for studio profile
- avcodec/g2meet: Check RGB upper limit
- avcodec/jpeg2000dec: Fix undefined shift in the jpeg2000_decode_packets_po_iteration() CPRL case
- avcodec/jpeg2000dec: Skip init for component in CPRL if nothing is to be done
- avcodec/g2meet: Change order of operations to avoid undefined behavior
- avcodec/flac_parser: Fix infinite loop
- avcodec/mpeg4videodec: Split decode_studio_vol_header() out of decode_studiovisualobject()
- avcodec/mpeg4videodec: Move decode_studiovisualobject() parsing in the branch for visual object parsing
- avcodec/mpeg4video_parser: Avoid litteral 0x1B6, use named constant instead
- avcodec/mpeg4video_parser: Fix incorrect spliting of MPEG-4 studio frames
- avformat/m4vdec: Use the same constant names as libavcodec
- avformat/m4vdec: Fix detection of raw MPEG-4 ES Studio
- avcodec/wavpack: Fix integer overflow in DEC_MED() / INC_MED()
- avcodec/wavpack: Fix integer overflow in wv_unpack_stereo()
- avcodec/error_resilience: Fix integer overflow in filter181()
- avcodec/h263dec: Check slice_ret in mspeg4 slice loop
- avcodec/elsdec: Fix memleaks
- avcodec/vc1_block: simplify ac_val computation
- avcodec/ffv1enc: Check that the crc + version combination is supported
- configure: The eac3_core bitstream filter needs the ac3 parser.
- configure: fix arm inline asm checks
- lavf/libssh: translate a read of 0 to EOF
- ffprobe: fix SEGV when new streams are added
- avformat/mpegts: fix incorrect indentation
- avformat/mpegts: initialize section_buf to fix valgrind test failure
- avformat/mpegts: reindent after last change
- avformat/mpegts: parse sections with multiple tables
- avformat/mpegts: clean up whitespace
- avformat/mpegts: use MAX_SECTION_SIZE instead of hardcoded value
- avformat/mpegts: skip non-PMT tids earlier
- avcodec/mediacodecdec: add workaround for buggy amlogic mpeg2 decoder
- avcodec/mediacodecdec: wait on first frame after input buffers are full
- avcodec/mediacodecdec: restructure mediacodec_receive_frame
- avcodec/mediacodec_wrapper: add helper to fetch SDK_INT
- avcodec/mediacodecdec: refactor pts handling
- avcodec/mediacodecdec: use AV_TIME_BASE_Q
- avcodec/mediacodecdec: clarify delay_flush specific code
- avcodec/videotoolbox: fix decoding of some HEVC videos
- avcodec/hevc: remove videotoolbox hack
- avcodec/videotoolbox: split h264/hevc callbacks
- avcodec/videotoolbox: cleanups
- avcodec/videotoolbox: fix kVTCouldNotFindVideoDecoderErr trying to decode HEVC on iOS
- avcodec/videotoolbox: improve logging of decoder errors
- avcodec/xwddec: fix palette alpha
- avformat/webm_chunk: always use a static buffer for get_chunk_filename
- configure: fix configure check for lilv-0
- avcodec/nvdec_hevc: fix scaling lists
- avcodec/hevcdec: make ff_hevc_frame_nb_refs take a const pointer
- lavf/bluray: translate a read of 0 to EOF
- lavf/dashenc: don't call flush_init_segment before avformat_write_header
- avdevice/decklink_dec: unref packets on avpacket_queue_put error
- avcodec/hnm4video: fix palette alpha
- avcodec/anm: fix palette alpha
- avformat/qtpalette: parse color table according to the QuickTime file format specs
- ffplay: Fix realloc_texture when input texture is NULL.
- hwcontext_vaapi: Fix compilation with libva versions < 1.4.0
- lavf/qsv: clone the frame which may be managed by framework
- lavf: make overlay_qsv work based on framesync
- avformat/segafilm - revert keyframe detection
- avformat/utils: refactor upstream_stream_timings
- avformat/utils: ignore outlier durations on subtitle/data streams as well
John Stebbins [Wed, 20 Jun 2018 16:10:47 +0000 (09:10 -0700)]
ffmpeg: fix currupt h.264 preview frames
The ffmpeg developers added a "heuristic" to the h.264 recovery point
code I wrote to prevent display of corrupt frames. The heuristic
doesn't work very reliably, so I've disabled it.
When I get a chance I'll see if I can come up with a better way to
handle what the heuristic was added for.
John Stebbins [Fri, 15 Jun 2018 21:51:59 +0000 (14:51 -0700)]
muxavformat: use alternate API to initialize out context
avformat_alloc_output_context2 does several things for us that we were
doing in separate steps. It also allocates AVFormatContext.url for us
so we do not have a case where we alloc something that ffmpeg frees.
John Stebbins [Fri, 15 Jun 2018 20:16:00 +0000 (13:16 -0700)]
muxavformat: fix crash on windows
We allocate AVFormatContext.url, but libavformat frees it. So we must
use an allocation function that is compatible with the free function
used by libavformat.
sr55 [Thu, 14 Jun 2018 16:00:52 +0000 (17:00 +0100)]
WinGui: Add HintPath to newtonsoft json in the worker process project. It shouldn't be needed but some VS installs appear to have issues without it. Fixes #1420
John Stebbins [Wed, 13 Jun 2018 22:07:25 +0000 (15:07 -0700)]
Fix PGS subtitle decoding...
...And add a timebase to every stream.
ffmpeg's subtitle decoder internally converts the packet pts to
AV_TIME_BASE units based on AVCodecContext.pkt_timebase. If
pkt_timebase is not set, the PGS subtitle decoder only returns
AV_NOPTS_VALUE for timestamps. So setting pkt_timebase in decpgssub.c
fixes PGS subtitle decoding.
Confusingly, the subtitle decoder does not convert the pts *back* to the
input timebase, but instead leaves them in AV_TIME_BASE units upon
returning a decoded subtitle.
To get a head start on fixing any other such issues that might arrise, I
have also set pkt_timebase in all other avcodec decoders.
John Stebbins [Wed, 13 Jun 2018 15:01:55 +0000 (08:01 -0700)]
muxavformat: fix use of deprecated AVFormat.filename
The new way is AVFormat.url. AVFormat.filename had lenght limitations
that url does not since it is allocated by the caller (and freed by
libavformat).
John Stebbins [Tue, 12 Jun 2018 19:09:59 +0000 (12:09 -0700)]
LinGui: change language lists from GtkListBox to GtkTreeView
The GtkTreeView is more flexible and more capable. Languages can be
searched for in the GtkTreeView by focusing the widget and typing what
you want to find. Double clicking an item in the list will add or
remove it from the "selected" languages list in audio and subtitle track
selection settings.
John Stebbins [Mon, 11 Jun 2018 22:15:01 +0000 (15:15 -0700)]
LinGui: add search function to language popups
The language list is long and displays native names while sorted by
English names, so it is difficult to find a language. This adds the
ability to "search" for a language based on it's initial character.
Typing a character will jump to the next entry that starts with that
character in its native name.