ffmpeg.git
4 years agodoc: avoid incorrect phrase 'allows to' n2.7.1
Andreas Cadhalpun [Sun, 14 Jun 2015 18:28:28 +0000 (20:28 +0200)]
doc: avoid incorrect phrase 'allows to'

Also fix typo found by Lou Logan:
Sacrifying -> Sacrificing

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 28efeb6502df37c99ccf18575d2552381d83a877)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoconfigure: make makeinfo_html check more robust
Andreas Cadhalpun [Sat, 13 Jun 2015 18:24:27 +0000 (20:24 +0200)]
configure: make makeinfo_html check more robust

The current check is too strict for newer makeinfo versions.
Existing version strings are:
makeinfo (GNU texinfo) 4.13
makeinfo (GNU texinfo) 5.2
texi2any (GNU texinfo) 5.9.93

Probably version 6 will come in the not too far future.

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 72654526e4489c0aac05d25cfeca5bbba26026b3)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agomatroskadec: validate audio channels and bitdepth
Andreas Cadhalpun [Mon, 15 Jun 2015 19:06:51 +0000 (21:06 +0200)]
matroskadec: validate audio channels and bitdepth

In the TTA extradata re-construction the values are written with
avio_wl16 and if they don't fit into uint16_t, this triggers an
av_assert2 in avio_w8.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 92e79a2f7bf2f8bb0cb2d1a3e4d76737557071c4)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agomatroskadec: check audio sample rate
Andreas Cadhalpun [Mon, 15 Jun 2015 18:59:22 +0000 (20:59 +0200)]
matroskadec: check audio sample rate

And default to 8000 if it is invalid.

An invalid sample rate can trigger av_assert2 in av_rescale_rnd.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 5b76c82fd7a5f4f36bb901b8c43d7f7319599599)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoUpdate for 2.7.1
Michael Niedermayer [Fri, 19 Jun 2015 17:03:00 +0000 (19:03 +0200)]
Update for 2.7.1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/dpxenc: implement write16/32 as functions
Michael Niedermayer [Fri, 19 Jun 2015 14:46:06 +0000 (16:46 +0200)]
avcodec/dpxenc: implement write16/32 as functions

Fixes undefined behavior and segfault

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8edc17b639c4ac47913c467107ffb43c67c64890)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/avstring: Do not print NULL
Michael Niedermayer [Fri, 19 Jun 2015 13:57:32 +0000 (15:57 +0200)]
avutil/avstring: Do not print NULL

Fixes segfault
Fixes Ticket4452

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 52e02a9e59f83ede84363d0f035389e44357d4a5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agopostproc: fix unaligned access
Andreas Cadhalpun [Thu, 18 Jun 2015 18:15:12 +0000 (20:15 +0200)]
postproc: fix unaligned access

QP_store is only 8-bit-aligned, so accessing it as uint32_t causes
SIGBUS crashes on sparc.
The AV_RN32/AV_WN32 macros only do unaligned access in the
HAVE_FAST_UNALIGNED case.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 590743101dc934043f34013f1c9bb9fb261355b0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agovp9: don't retain NULL as segmentation_map
Andreas Cadhalpun [Wed, 17 Jun 2015 17:02:15 +0000 (19:02 +0200)]
vp9: don't retain NULL as segmentation_map

This fixes segmentation faults, which were introduced in commit
4ba8f327.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit d216b9debd9843d31732ebb7344a85b3cd96b7cc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat: clarify what package needs to be compiled with SSL support
wm4 [Thu, 18 Jun 2015 18:36:19 +0000 (20:36 +0200)]
avformat: clarify what package needs to be compiled with SSL support

Try to reduce user confusion.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f6c3f1ed6048ebc55f652ed59f7af9acebbf57e5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/libx264: Avoid reconfig on equivalent aspect ratios
Michael Niedermayer [Thu, 18 Jun 2015 12:40:11 +0000 (14:40 +0200)]
avcodec/libx264: Avoid reconfig on equivalent aspect ratios

Workaround for ticket #4287.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7b1c03aa744f1f82fe30ea2cd2aeef2ea01d5ce9)

Conflicts:
libavcodec/libx264.c

4 years agoavcodec/flacenc: Fix Invalid Rice order
George Boyle [Tue, 16 Jun 2015 07:25:01 +0000 (08:25 +0100)]
avcodec/flacenc: Fix Invalid Rice order

Fixes ticket #4628.

The problem arose, in the sample file at least, in the last block where the
minimum and maximum Rice partition orders were both 0. In that case, and any
other where pmax == pmin, the original UINT32_MAX placeholder value for
bits[opt_porder] was getting overwritten before the comparison to check if the
current partition order is a new optimal, so the correct partition order and
RiceContext params were not being set.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2469ed32c81ebf2347e6883091c566724b286167)

4 years agotls_gnutls: fix hang on disconnection
wm4 [Sat, 13 Jun 2015 21:55:21 +0000 (23:55 +0200)]
tls_gnutls: fix hang on disconnection

GNUTLS_SHUT_RDWR means GnuTLS will keep waiting for the server's
termination reply. But since we don't shutdown the TCP connection at
this point yet, GnuTLS will just keep skipping actual data from the
server, which basically is perceived as hang.

Use GNUTLS_SHUT_WR instead, which doesn't have this problem.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2222f419da99ef85d49ab04e7e15b76612f4d054)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc_ps: Only discard overread VPS if a previous is available
Michael Niedermayer [Thu, 18 Jun 2015 16:03:21 +0000 (18:03 +0200)]
avcodec/hevc_ps: Only discard overread VPS if a previous is available

Fixes Ticket4621

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 57078e4d255a06246fef27846073f5ffb312b5dc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoffmpeg: Free last_frame instead of just unref
Michael Niedermayer [Thu, 18 Jun 2015 03:27:08 +0000 (05:27 +0200)]
ffmpeg: Free last_frame instead of just unref

Fixes Ticket4611

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d1050d9950610aa2b27878b67bb2b902dd717e7c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/ffv1enc: fix bps for >8bit yuv when not explicitly set
Michael Niedermayer [Wed, 17 Jun 2015 22:34:59 +0000 (00:34 +0200)]
avcodec/ffv1enc: fix bps for >8bit yuv when not explicitly set

Fixes Ticket4636

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3a6a8f6ee1cb619913b87b6c78e0436303e2a35f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavio: fix potential crashes when combining ffio_ensure_seekback + crc
wm4 [Tue, 16 Jun 2015 22:21:02 +0000 (00:21 +0200)]
avio: fix potential crashes when combining ffio_ensure_seekback + crc

Calling ffio_ensure_seekback() if ffio_init_checksum() has been called
on the same context can lead to out of bounds memory accesses and
crashes. The reason is that ffio_ensure_seekback() does not update
checksum_ptr after reallocating the buffer, resulting in a dangling
pointer.

This effectively fixes potential crashes when opening mp3 files.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dc87758775e2ce8be84e4fe598e12416e83d2845)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoexamples/demuxing_decoding: use properties from frame instead of video_dec_ctx
Andreas Cadhalpun [Sun, 14 Jun 2015 18:34:16 +0000 (20:34 +0200)]
examples/demuxing_decoding: use properties from frame instead of video_dec_ctx

This is more robust.

And only check if there is actually a frame returned.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit dd6c8575dbc8d3ff5dc2ffacb5028c253066ff78)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoh264: er: Copy from the previous reference only if compatible
Andreas Cadhalpun [Sun, 14 Jun 2015 10:40:18 +0000 (12:40 +0200)]
h264: er: Copy from the previous reference only if compatible

Also use the frame pixel format instead of the one from the codec
context, which is more robust.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit fdc64a104410f5fcc7f35b62287b0ae502b7061a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agodoc: fix spelling errors
Andreas Cadhalpun [Sat, 13 Jun 2015 19:34:40 +0000 (21:34 +0200)]
doc: fix spelling errors

Neccessary -> Necessary
formated   -> formatted
thee       -> the
eventhough -> even though
seperately -> separately

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit ed0b1db640110cccdbf0db1d882fb952cf3a130d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoconfigure: only disable VSX for !ppc64el
Andreas Cadhalpun [Sat, 13 Jun 2015 11:09:21 +0000 (13:09 +0200)]
configure: only disable VSX for !ppc64el

This reverts commit 04f0002, which made it impossible to enable VSX with
a generic cpu.

This changes the behavior back to what it was before commit b0af404.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 45babb01217f4cf776c50f1bec8ced0065277c89)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoffmpeg_opt: Check for localtime() failure
Michael Niedermayer [Fri, 12 Jun 2015 13:36:20 +0000 (15:36 +0200)]
ffmpeg_opt: Check for localtime() failure

Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8e91d9652ea5048d9014e7636e12c6ed4732d7b7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/singlejpeg: fix standalone compilation
James Almer [Sat, 13 Jun 2015 20:47:13 +0000 (17:47 -0300)]
avformat/singlejpeg: fix standalone compilation

(cherry picked from commit 4aebaed0e17b396bd9d18acb8e58a4700c7559df)

4 years agoconfigure: Disable VSX on unspecified / generic CPUs
Michael Niedermayer [Fri, 12 Jun 2015 11:20:25 +0000 (13:20 +0200)]
configure: Disable VSX on unspecified / generic CPUs

Fixes fate tests on PPC64be

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 04f00022910c8b468fcf72c1f12ac410d3588802)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat: Fix bug in parse_rps for HEVC.
Deliang Fu [Wed, 10 Jun 2015 04:30:46 +0000 (12:30 +0800)]
avformat: Fix bug in parse_rps for HEVC.

Make the logic in libavformat/hevc.c parse_rps align with libavcodec/hevc_ps.c ff_hevc_decode_short_term_rps

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6e1f8780c833ef55815111d4771b95ff78567cdb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agotakdec: ensure chan2 is a valid channel index
Andreas Cadhalpun [Tue, 9 Jun 2015 22:12:38 +0000 (00:12 +0200)]
takdec: ensure chan2 is a valid channel index

If chan2 is not smaller than the number of channels, it can cause
segmentation faults due to dereferencing a NULL pointer.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 05c57ba2f42324da2fdc93d83d65bb68dd637613)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264_slice: Use AVFrame diemensions for grayscale handling
Michael Niedermayer [Wed, 10 Jun 2015 09:37:48 +0000 (11:37 +0200)]
avcodec/h264_slice: Use AVFrame diemensions for grayscale handling

The AVFrame values are closer to the AVFrame bitmap changed instead of
the AVCodecContext values, so this should be more robust

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit aef0e0f009802f1a5e21eb6465498632071e4475)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavdevice/lavfi: do not rescale AV_NOPTS_VALUE in lavfi_read_packet() n2.7
Michael Niedermayer [Tue, 9 Jun 2015 22:47:43 +0000 (00:47 +0200)]
avdevice/lavfi: do not rescale AV_NOPTS_VALUE in lavfi_read_packet()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 913685f55208efd78bfc34d82b261bd449e69774)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMAINTAINERS: add 2.7
Michael Niedermayer [Tue, 9 Jun 2015 21:54:46 +0000 (23:54 +0200)]
MAINTAINERS: add 2.7

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoUpdate for 2.7
Michael Niedermayer [Tue, 9 Jun 2015 21:21:20 +0000 (23:21 +0200)]
Update for 2.7

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoadd RELEASE_NOTES, based on previous
Michael Niedermayer [Tue, 9 Jun 2015 21:19:54 +0000 (23:19 +0200)]
add RELEASE_NOTES, based on previous

4 years agosonic: set avctx->channels in sonic_decode_init
Andreas Cadhalpun [Tue, 9 Jun 2015 20:41:24 +0000 (22:41 +0200)]
sonic: set avctx->channels in sonic_decode_init

Otherwise it can be 0 in sonic_decode_frame, causing SIGFPE crashes.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoChangelog: Add 2.7 entry
Michael Niedermayer [Tue, 9 Jun 2015 21:14:57 +0000 (23:14 +0200)]
Changelog: Add 2.7 entry

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agodoc/APIchanges: fill in missing stuff
Michael Niedermayer [Tue, 9 Jun 2015 21:08:53 +0000 (23:08 +0200)]
doc/APIchanges: fill in missing stuff

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agodoc/APIchanges: Add 2.7 separator
Michael Niedermayer [Tue, 9 Jun 2015 21:05:07 +0000 (23:05 +0200)]
doc/APIchanges: Add 2.7 separator

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolibavutil/channel_layout: Correctly return layout when channel specification ends...
Simon Thelen [Tue, 9 Jun 2015 02:55:57 +0000 (04:55 +0200)]
libavutil/channel_layout: Correctly return layout when channel specification ends with a trailing 'c'.

Return layout when FF_API_GET_CHANNEL_LAYOUT_COMPAT is set even if the
layout itself is not in the deprecated style.

Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavf/webm_chunk: Remove AVFMT_ALLOW_FLUSH
Vignesh Venkatasubramanian [Tue, 9 Jun 2015 17:02:56 +0000 (10:02 -0700)]
lavf/webm_chunk: Remove AVFMT_ALLOW_FLUSH

The flag was set unintentionally and the code will break if a NULL
packet is passed in.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/jpeg2000dec: Fix gain regression with gray16
Michael Niedermayer [Tue, 9 Jun 2015 18:26:38 +0000 (20:26 +0200)]
avcodec/jpeg2000dec: Fix gain regression with gray16

Found-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agofate: Force jpeg2000 decoder for dcinema
Michael Niedermayer [Tue, 9 Jun 2015 17:32:55 +0000 (19:32 +0200)]
fate: Force jpeg2000 decoder for dcinema

so that no external decoder is used which would break the test

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/libopenjpegdec: Mark as experimental if <= 1.3
Michael Niedermayer [Tue, 9 Jun 2015 01:35:07 +0000 (03:35 +0200)]
avcodec/libopenjpegdec: Mark as experimental if <= 1.3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/jpeg2000: remove unused variable
Michael Niedermayer [Tue, 9 Jun 2015 16:48:39 +0000 (18:48 +0200)]
avcodec/jpeg2000: remove unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/oggenc: Fix return code in case of flushing
Michael Niedermayer [Tue, 9 Jun 2015 16:42:55 +0000 (18:42 +0200)]
avformat/oggenc: Fix return code in case of flushing

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'b14086ca38efa1a86cb0f0c6aa147b05f698877b'
Michael Niedermayer [Tue, 9 Jun 2015 16:18:38 +0000 (18:18 +0200)]
Merge commit 'b14086ca38efa1a86cb0f0c6aa147b05f698877b'

* commit 'b14086ca38efa1a86cb0f0c6aa147b05f698877b':
  mkv: Correctly report the latest packet had been flushed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'b380337020e271c5431aa8ef8f8e9dfda5e919b2'
Michael Niedermayer [Tue, 9 Jun 2015 16:08:41 +0000 (18:08 +0200)]
Merge commit 'b380337020e271c5431aa8ef8f8e9dfda5e919b2'

* commit 'b380337020e271c5431aa8ef8f8e9dfda5e919b2':
  mpjpegdec: don't try to alloc an AVIOContext when probe is guaranteed to fail

See: 1382add59df149193620ca0714ceac0929208c88
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '210921722bf828b3b895ebcbc34374e6c4452c6f'
Michael Niedermayer [Tue, 9 Jun 2015 15:43:24 +0000 (17:43 +0200)]
Merge commit '210921722bf828b3b895ebcbc34374e6c4452c6f'

* commit '210921722bf828b3b895ebcbc34374e6c4452c6f':
  imc: add required padding for GetBitContext buffer

Conflicts:
libavcodec/imc.c

See: 7444cf9a9c0b8b2bba8198af2823521c654a48f4
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '09447f2b0fafac6d9565aab82a4c5f16fc99ee5e'
Michael Niedermayer [Tue, 9 Jun 2015 15:35:07 +0000 (17:35 +0200)]
Merge commit '09447f2b0fafac6d9565aab82a4c5f16fc99ee5e'

* commit '09447f2b0fafac6d9565aab82a4c5f16fc99ee5e':
  ac3_parser: add required padding for GetBitContext buffer

See: fccd85b9f30525f88692f53134eba41f1f2d90db
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'fb1473080223a634b8ac2cca48a632d037a0a69d'
Michael Niedermayer [Tue, 9 Jun 2015 15:21:45 +0000 (17:21 +0200)]
Merge commit 'fb1473080223a634b8ac2cca48a632d037a0a69d'

* commit 'fb1473080223a634b8ac2cca48a632d037a0a69d':
  aac_parser: add required padding for GetBitContext buffer

See: fccd85b9f30525f88692f53134eba41f1f2d90db
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agodoc/muxers: document new break_non_keyframes option
Rodger Combs [Tue, 9 Jun 2015 11:44:51 +0000 (06:44 -0500)]
doc/muxers: document new break_non_keyframes option

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/jpeg2000: Disable special case for JPEG2000_QSTY_SI
Michael Niedermayer [Tue, 9 Jun 2015 14:30:35 +0000 (16:30 +0200)]
avcodec/jpeg2000: Disable special case for JPEG2000_QSTY_SI

The code gave apparently completely wrong values

Fixes Ticket2872

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/jpeg2000dec: Add placeholder for PLT parsing
Michael Niedermayer [Tue, 9 Jun 2015 13:16:46 +0000 (15:16 +0200)]
avcodec/jpeg2000dec: Add placeholder for PLT parsing

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/jpeg2000dec: Handle Psot = 0
Michael Niedermayer [Tue, 9 Jun 2015 12:43:03 +0000 (14:43 +0200)]
avcodec/jpeg2000dec: Handle Psot = 0

Fixes Ticket2869

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agomkv: Correctly report the latest packet had been flushed
Luca Barbato [Tue, 9 Jun 2015 08:47:11 +0000 (10:47 +0200)]
mkv: Correctly report the latest packet had been flushed

Bug-Id: 865
CC: libav-stable@libav.org
4 years agolavf/segment: add an option to allow breaking on non-keyframes
Rodger Combs [Tue, 9 Jun 2015 07:32:18 +0000 (02:32 -0500)]
lavf/segment: add an option to allow breaking on non-keyframes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agompjpegdec: don't try to alloc an AVIOContext when probe is guaranteed to fail
James Almer [Mon, 8 Jun 2015 20:19:25 +0000 (17:19 -0300)]
mpjpegdec: don't try to alloc an AVIOContext when probe is guaranteed to fail

The first check is done without the AVIOContext, so alloc it only if said check succeeds

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
4 years agoimc: add required padding for GetBitContext buffer
Janne Grunau [Mon, 8 Jun 2015 12:48:54 +0000 (14:48 +0200)]
imc: add required padding for GetBitContext buffer

Fixes stack buffer overflow errors detected by address sanitizer in
fate-imc.

CC: libav-stable@libav.org
4 years agoac3_parser: add required padding for GetBitContext buffer
Janne Grunau [Mon, 8 Jun 2015 12:48:26 +0000 (14:48 +0200)]
ac3_parser: add required padding for GetBitContext buffer

Fixes stack buffer overflow errors detected by address sanitizer in
various fate tests.

CC: libav-stable@libav.org
4 years agoaac_parser: add required padding for GetBitContext buffer
Janne Grunau [Mon, 8 Jun 2015 12:45:12 +0000 (14:45 +0200)]
aac_parser: add required padding for GetBitContext buffer

Fixes stack buffer overflow errors detected by address sanitizer in
various fate tests.

CC: libav-stable@libav.org
4 years agoavcodec/x86/h264_weight: handle weight1=128
Michael Niedermayer [Tue, 9 Jun 2015 03:11:09 +0000 (05:11 +0200)]
avcodec/x86/h264_weight: handle weight1=128

Fix ticket4596

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/jpeg2000dec: Fix some 5/3 bitexactness issues
Michael Niedermayer [Tue, 9 Jun 2015 00:01:40 +0000 (02:01 +0200)]
avcodec/jpeg2000dec: Fix some 5/3 bitexactness issues

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavf/tls_securetransport: fix SNI support when not verifying
Rodger Combs [Mon, 8 Jun 2015 21:59:32 +0000 (16:59 -0500)]
lavf/tls_securetransport: fix SNI support when not verifying

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/jpeg2000dec: Fix subsampled decoding
Michael Niedermayer [Mon, 8 Jun 2015 22:27:15 +0000 (00:27 +0200)]
avcodec/jpeg2000dec: Fix subsampled decoding

Fixes part of Ticket3619

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/jpeg2000dec: Check that coords match before applying ICT
Michael Niedermayer [Mon, 8 Jun 2015 22:37:26 +0000 (00:37 +0200)]
avcodec/jpeg2000dec: Check that coords match before applying ICT

This avoid potential out of array accesses

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/jpeg2000dec: Fix high bit depth branch sample shift
Michael Niedermayer [Mon, 8 Jun 2015 21:36:59 +0000 (23:36 +0200)]
avcodec/jpeg2000dec: Fix high bit depth branch sample shift

Fix part of Ticket3619

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agovp8: change mv_{min,max}.{x,y} type to int
Andreas Cadhalpun [Mon, 8 Jun 2015 20:38:29 +0000 (22:38 +0200)]
vp8: change mv_{min,max}.{x,y} type to int

If one of the dimensions is larger than 8176, s->mb_width or
s->mb_height is larger than 511, leading to an int16_t overflow of
s->mv_max.{x,y}. This then causes av_clip to be called with amin > amax.

Changing the type to int avoids the overflow and has no negative
effect, because s->mv_max is only used in clamp_mv for clipping.
Since mv_max.{x,y} is positive and mv_min.{x,y} negative, av_clip can't
increase the absolute value. The input to av_clip is an int16_t, and
thus the output fits into int16_t as well.

For additional safety, s->mv_{min,max}.{x,y} are clipped to int16_t range
before use.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agompjpegdec: don't try to alloc an AVIOContext when probe is guaranteed to fail
James Almer [Mon, 8 Jun 2015 20:39:38 +0000 (17:39 -0300)]
mpjpegdec: don't try to alloc an AVIOContext when probe is guaranteed to fail

The first check is done without the AVIOContext, so alloc it only if said check succeeds

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoMerge commit '4733a12dd17a91d606e0079ff9bb48b9f419cbef'
Michael Niedermayer [Mon, 8 Jun 2015 21:05:01 +0000 (23:05 +0200)]
Merge commit '4733a12dd17a91d606e0079ff9bb48b9f419cbef'

* commit '4733a12dd17a91d606e0079ff9bb48b9f419cbef':
  rtpdec_asf: Check memory allocation and free memory on error

Conflicts:
libavformat/rtpdec_asf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '6308cd4868d2bd5fdf8bfa8dd10856c9a91874f5'
Michael Niedermayer [Mon, 8 Jun 2015 20:56:03 +0000 (22:56 +0200)]
Merge commit '6308cd4868d2bd5fdf8bfa8dd10856c9a91874f5'

* commit '6308cd4868d2bd5fdf8bfa8dd10856c9a91874f5':
  mov: Check memory allocation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'bc1eace1b3654c490cb2c226b3c80854244dbb9a'
Michael Niedermayer [Mon, 8 Jun 2015 20:48:14 +0000 (22:48 +0200)]
Merge commit 'bc1eace1b3654c490cb2c226b3c80854244dbb9a'

* commit 'bc1eace1b3654c490cb2c226b3c80854244dbb9a':
  jack: Check memory allocation

Conflicts:
libavdevice/jack.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'f7e932473314e6ca4c851d49cbde8570b6e66383'
Michael Niedermayer [Mon, 8 Jun 2015 20:37:41 +0000 (22:37 +0200)]
Merge commit 'f7e932473314e6ca4c851d49cbde8570b6e66383'

* commit 'f7e932473314e6ca4c851d49cbde8570b6e66383':
  audiointerleave: Always initialize new_pkt

Conflicts:
libavformat/audiointerleave.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '8ef98855d25e457094468e2e1a79d9b10d6445b2'
Michael Niedermayer [Mon, 8 Jun 2015 20:35:49 +0000 (22:35 +0200)]
Merge commit '8ef98855d25e457094468e2e1a79d9b10d6445b2'

* commit '8ef98855d25e457094468e2e1a79d9b10d6445b2':
  sctp: Always initialize outmsg struct

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'caf7be30b11288c498fae67be4741bfbf083d977'
Michael Niedermayer [Mon, 8 Jun 2015 20:14:18 +0000 (22:14 +0200)]
Merge commit 'caf7be30b11288c498fae67be4741bfbf083d977'

* commit 'caf7be30b11288c498fae67be4741bfbf083d977':
  mpjpgdec: free AVIOContext leak on early probe fail

Conflicts:
libavformat/mpjpegdec.c

See: 34d278f9838e355b3b2c7a9c0f77d7fcaf37ce49, this was mistakenly reimplemented, also see ffmpeg IRC log of today
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '925b80d64029d41962e5998d7d901226c3a9baea'
Michael Niedermayer [Mon, 8 Jun 2015 20:05:20 +0000 (22:05 +0200)]
Merge commit '925b80d64029d41962e5998d7d901226c3a9baea'

* commit '925b80d64029d41962e5998d7d901226c3a9baea':
  mpegvideo: Move OutFormat enum to mpegutils.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '9bb11be0e5a75782c3139ad058c2b571499aa37d'
Michael Niedermayer [Mon, 8 Jun 2015 19:30:05 +0000 (21:30 +0200)]
Merge commit '9bb11be0e5a75782c3139ad058c2b571499aa37d'

* commit '9bb11be0e5a75782c3139ad058c2b571499aa37d':
  mpegvideo: Split picture allocation for encoding and decoding

Conflicts:
libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agovp9: change type of tile_size from unsigned to int64_t
Andreas Cadhalpun [Sun, 7 Jun 2015 16:50:43 +0000 (18:50 +0200)]
vp9: change type of tile_size from unsigned to int64_t

Otherwise the check 'tile_size < size' treats a negative size as
unsigned, causing the check to pass. This subsequently leads to
segmentation faults.

This was originally fixed as part of Libav commit 72ca83, so the
original author is one of the following developers:
        Anton Khirnov <anton@khirnov.net>
        Diego Biurrun <diego@biurrun.de>
        Luca Barbato <lu_zero@gentoo.org>
        Martin Storsj√∂ <martin@martin.st>

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
4 years agoMerge commit 'f8716a1408f4f4ec63857b7015fbd62f9eac344a'
Michael Niedermayer [Mon, 8 Jun 2015 19:16:36 +0000 (21:16 +0200)]
Merge commit 'f8716a1408f4f4ec63857b7015fbd62f9eac344a'

* commit 'f8716a1408f4f4ec63857b7015fbd62f9eac344a':
  mpegvideo: Rework frame_size_alloc function

Conflicts:
libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'da0c8664b4dc906696803685f7e53ade68594ab8'
Michael Niedermayer [Mon, 8 Jun 2015 18:58:13 +0000 (20:58 +0200)]
Merge commit 'da0c8664b4dc906696803685f7e53ade68594ab8'

* commit 'da0c8664b4dc906696803685f7e53ade68594ab8':
  mpegvideo: Move various temporary buffers to a separate context

Conflicts:
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_motion.c
libavcodec/rv34.c
libavcodec/vc1_mc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agompjpegdec: fix memory leak in probe function
James Almer [Mon, 8 Jun 2015 19:02:30 +0000 (16:02 -0300)]
mpjpegdec: fix memory leak in probe function

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoMerge commit 'a6f19d6a9f8d1e08653d9d77581e8c823f4955c2'
Michael Niedermayer [Mon, 8 Jun 2015 18:39:38 +0000 (20:39 +0200)]
Merge commit 'a6f19d6a9f8d1e08653d9d77581e8c823f4955c2'

* commit 'a6f19d6a9f8d1e08653d9d77581e8c823f4955c2':
  configure: Support MSVC 2015

Conflicts:
configure
libavutil/internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswr: Fix ASSERT_LEVEL warning
Michael Niedermayer [Mon, 8 Jun 2015 18:16:06 +0000 (20:16 +0200)]
swr: Fix ASSERT_LEVEL warning

Found-by: cehoyos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hq_hqa: Fix signness of tag
Michael Niedermayer [Mon, 8 Jun 2015 16:53:13 +0000 (18:53 +0200)]
avcodec/hq_hqa: Fix signness of tag

Fixes Ticket4509

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/apng: Add partial support for blending with PAL8 pixel format
Donny Yang [Tue, 2 Jun 2015 15:49:27 +0000 (15:49 +0000)]
avcodec/apng: Add partial support for blending with PAL8 pixel format

Currently restricted to blending pixels that only contain either
0 or 255 in their alpha components

Signed-off-by: Donny Yang <work@kota.moe>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/apng: Add support for blending with GRAY8A pixel format
Donny Yang [Tue, 2 Jun 2015 15:49:26 +0000 (15:49 +0000)]
avcodec/apng: Add support for blending with GRAY8A pixel format

Signed-off-by: Donny Yang <work@kota.moe>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/apng: Add blending support for non-alpha pixel formats
Donny Yang [Tue, 2 Jun 2015 15:49:25 +0000 (15:49 +0000)]
avcodec/apng: Add blending support for non-alpha pixel formats

Signed-off-by: Donny Yang <work@kota.moe>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/apng: Dispose previous frame properly
Donny Yang [Sun, 7 Jun 2015 18:12:30 +0000 (18:12 +0000)]
avcodec/apng: Dispose previous frame properly

The spec specifies the dispose operation as how the current (i.e., currently
being rendered) frame should be disposed when the next frame is blended onto it

This is contrary to ffmpeg's current behaviour of interpreting the dispose
operation as how the previous (i.e., already rendered) frame should be disposed

This patch fixes ffmpeg's behaviour to match those of the spec, which involved
a rewrite of the blending function

Signed-off-by: Donny Yang <work@kota.moe>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavf/tls: let the user specify what name to verify against
Rodger Combs [Mon, 8 Jun 2015 09:50:48 +0000 (04:50 -0500)]
lavf/tls: let the user specify what name to verify against

This can be useful for debugging, or in scenarios where the user
doesn't want to use the system's DNS settings for whatever reason.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agortpdec_asf: Check memory allocation and free memory on error
Vittorio Giovara [Wed, 3 Jun 2015 13:16:50 +0000 (14:16 +0100)]
rtpdec_asf: Check memory allocation and free memory on error

CC: libav-stable@libav.org
Bug-Id: CID 1257774

4 years agomov: Check memory allocation
Vittorio Giovara [Wed, 3 Jun 2015 13:16:49 +0000 (14:16 +0100)]
mov: Check memory allocation

CC: libav-stable@libav.org
Bug-Id: CID 1292518

4 years agojack: Check memory allocation
Vittorio Giovara [Wed, 3 Jun 2015 13:16:48 +0000 (14:16 +0100)]
jack: Check memory allocation

CC: libav-stable@libav.org
Bug-Id: CID 1292520

4 years agoaudiointerleave: Always initialize new_pkt
Vittorio Giovara [Wed, 3 Jun 2015 13:16:47 +0000 (14:16 +0100)]
audiointerleave: Always initialize new_pkt

CC: libav-stable@libav.org
Bug-Id: CID 609333

4 years agosctp: Always initialize outmsg struct
Vittorio Giovara [Wed, 3 Jun 2015 13:16:45 +0000 (14:16 +0100)]
sctp: Always initialize outmsg struct

CC: libav-stable@libav.org
Bug-Id: CID 1302711

4 years agompjpgdec: free AVIOContext leak on early probe fail
Janne Grunau [Mon, 8 Jun 2015 11:31:04 +0000 (13:31 +0200)]
mpjpgdec: free AVIOContext leak on early probe fail

4 years agompegvideo: Move OutFormat enum to mpegutils.h
Vittorio Giovara [Sun, 31 May 2015 13:49:55 +0000 (15:49 +0200)]
mpegvideo: Move OutFormat enum to mpegutils.h

It is necessary to avoid circular header dependencies.

4 years agompegvideo: Split picture allocation for encoding and decoding
Vittorio Giovara [Sun, 31 May 2015 13:49:54 +0000 (15:49 +0200)]
mpegvideo: Split picture allocation for encoding and decoding

The main ff_alloc_picture() function is made more generic with all the
parameters necessary as arguments. This will allows to move most of the
related functions to a separate file later.

Right now wrappers are provided to try and minimize the number of
changes in the code.

4 years agompegvideo: Rework frame_size_alloc function
Vittorio Giovara [Sun, 31 May 2015 13:49:53 +0000 (15:49 +0200)]
mpegvideo: Rework frame_size_alloc function

Use more generic arguments and remove its static attribute since it will
be moved to a separate file.

4 years agompegvideo: Move various temporary buffers to a separate context
Vittorio Giovara [Sun, 31 May 2015 13:49:52 +0000 (15:49 +0200)]
mpegvideo: Move various temporary buffers to a separate context

4 years agoconfigure: Support MSVC 2015
Luca Barbato [Fri, 5 Jun 2015 13:07:06 +0000 (15:07 +0200)]
configure: Support MSVC 2015

The C runtime C99 compatibility had been improved a lot and it now
rejects some of the compatibility defines provided for the older
versions.

Many thanks to Ray for the time spent testing.

Bug-Id: 864
CC: libav-stable@libav.org
4 years agoavformat/mxfenc: Allow overriding /manual setting of the signal standard
Michael Niedermayer [Sat, 6 Jun 2015 01:06:12 +0000 (03:06 +0200)]
avformat/mxfenc: Allow overriding /manual setting of the signal standard

previous patch reviewed-by: tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoatrac3plus: give the phase_shift flag a better name.
Max Poliakovski [Sun, 7 Jun 2015 10:52:06 +0000 (12:52 +0200)]
atrac3plus: give the phase_shift flag a better name.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoatrac3plus: add support for GHA phase inversion.
Max Poliakovski [Sat, 6 Jun 2015 21:28:47 +0000 (23:28 +0200)]
atrac3plus: add support for GHA phase inversion.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/version: Bump version for single jpeg muxer
Michael Niedermayer [Mon, 8 Jun 2015 02:00:45 +0000 (04:00 +0200)]
avformat/version: Bump version for single jpeg muxer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>