ffmpeg.git
4 years agoavformat/tiertexseq: use av_freep(), do not leave stale pointers in memory
Michael Niedermayer [Tue, 7 Oct 2014 11:44:26 +0000 (13:44 +0200)]
avformat/tiertexseq: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavfilter/af_adelay: use av_freep(), do not leave stale pointers in memory
Michael Niedermayer [Tue, 7 Oct 2014 11:44:26 +0000 (13:44 +0200)]
avfilter/af_adelay: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '9a03c2323593173a201cb75edd1b49887cf811ed'
Michael Niedermayer [Tue, 7 Oct 2014 10:49:38 +0000 (12:49 +0200)]
Merge commit '9a03c2323593173a201cb75edd1b49887cf811ed'

* commit '9a03c2323593173a201cb75edd1b49887cf811ed':
  h263dec: Force padding bug workaround for H.263.

This is not merged as it breaks a good part of the error concealment/resilience for H.263
Also, messenger.h263 plays fine in ffmpeg.
If anyone has any other h263 files that do not work, please open an issue on trak or
mail me!

See: d225b0f7aaa65eafccc87165130e1c4bab71708b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'd208d1eba3799c58fd6d3602d31de3e686f14aec'
Michael Niedermayer [Tue, 7 Oct 2014 10:29:07 +0000 (12:29 +0200)]
Merge commit 'd208d1eba3799c58fd6d3602d31de3e686f14aec'

* commit 'd208d1eba3799c58fd6d3602d31de3e686f14aec':
  hevc_mvs: make sure to always initialize the temporal MV fully

Conflicts:
libavcodec/hevc_mvs.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '79a60c8e779242b5ba4c531b2c706c871e8e6420'
Michael Niedermayer [Tue, 7 Oct 2014 10:10:50 +0000 (12:10 +0200)]
Merge commit '79a60c8e779242b5ba4c531b2c706c871e8e6420'

* commit '79a60c8e779242b5ba4c531b2c706c871e8e6420':
  hevc_mvs: initialize the temporal MV in case of missing ref

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoh263dec: Force padding bug workaround for H.263.
Josh Allmann [Fri, 3 Oct 2014 16:42:25 +0000 (09:42 -0700)]
h263dec: Force padding bug workaround for H.263.

Fixes decoding of http://samples.mplayerhq.hu/V-codecs/h263/h263-raw/messenger.h263

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agohevc_mvs: make sure to always initialize the temporal MV fully
Anton Khirnov [Mon, 29 Sep 2014 16:25:14 +0000 (16:25 +0000)]
hevc_mvs: make sure to always initialize the temporal MV fully

The spec requires this.

Fixes uninitialized reads on some samples.

Remove now unnecessary initialization of the whole merge candidate list.

4 years agohevc_mvs: initialize the temporal MV in case of missing ref
Anton Khirnov [Mon, 29 Sep 2014 16:16:50 +0000 (16:16 +0000)]
hevc_mvs: initialize the temporal MV in case of missing ref

The caller expects the MV to always be initialized.

4 years agoavformat/hls: use av_freep(), do not leave stale pointers in memory
Michael Niedermayer [Tue, 7 Oct 2014 02:29:27 +0000 (04:29 +0200)]
avformat/hls: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/escape124: use av_freep(), do not leave stale pointers in memory
Michael Niedermayer [Tue, 7 Oct 2014 01:40:57 +0000 (03:40 +0200)]
avcodec/escape124: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/proresenc_kostya: use av_freep(), do not leave stale pointers in memory
Michael Niedermayer [Tue, 7 Oct 2014 01:40:57 +0000 (03:40 +0200)]
avcodec/proresenc_kostya: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/avpacket: use av_freep(), do not leave stale pointers in memory
Michael Niedermayer [Tue, 7 Oct 2014 01:40:57 +0000 (03:40 +0200)]
avcodec/avpacket: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/avpacket: simplify freeing pkt->data
Michael Niedermayer [Tue, 7 Oct 2014 01:40:15 +0000 (03:40 +0200)]
avcodec/avpacket: simplify freeing pkt->data

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mxfdec: read reel_name and source timecode from physical source package
Mark Reid [Sun, 5 Oct 2014 00:42:51 +0000 (17:42 -0700)]
avformat/mxfdec: read reel_name and source timecode from physical source package

Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '28816050e47b6dba430a52e429d21a864cffda8e'
Michael Niedermayer [Tue, 7 Oct 2014 00:51:08 +0000 (02:51 +0200)]
Merge commit '28816050e47b6dba430a52e429d21a864cffda8e'

* commit '28816050e47b6dba430a52e429d21a864cffda8e':
  lavf: Set the stream time base hint properly for chained muxers

Conflicts:
libavformat/segment.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'b76249443864c88ffb2d41ab8d1de7432e985dc7'
Michael Niedermayer [Tue, 7 Oct 2014 00:39:58 +0000 (02:39 +0200)]
Merge commit 'b76249443864c88ffb2d41ab8d1de7432e985dc7'

* commit 'b76249443864c88ffb2d41ab8d1de7432e985dc7':
  sdp: Simplify parsing/conversion of H264 extradata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '153fadc390d05aa47e5e2c56290401898fe41a23'
Michael Niedermayer [Tue, 7 Oct 2014 00:15:07 +0000 (02:15 +0200)]
Merge commit '153fadc390d05aa47e5e2c56290401898fe41a23'

* commit '153fadc390d05aa47e5e2c56290401898fe41a23':
  ff_get_format: fix infinite loop

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavf: Set the stream time base hint properly for chained muxers
Martin Storsjö [Mon, 6 Oct 2014 08:41:33 +0000 (11:41 +0300)]
lavf: Set the stream time base hint properly for chained muxers

This avoids warnings about using the codec time base as time
base hint.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agosdp: Simplify parsing/conversion of H264 extradata
Martin Storsjö [Fri, 3 Oct 2014 17:49:01 +0000 (20:49 +0300)]
sdp: Simplify parsing/conversion of H264 extradata

By using ff_avc_write_annexb_extradata instead of the h264_mp4toannexb
BSF, the code for doing the conversion itself is kept much shorter,
there's less state to restore at the end, we don't risk leaving the
AVCodecContext in an inconsistent state if returning early due to
errors, etc.

Also add a missing free if the base64 encoding fails.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoMerge commit '577899a6458ccad9026eb268f10dc0b39c224c8d'
Michael Niedermayer [Mon, 6 Oct 2014 19:08:55 +0000 (21:08 +0200)]
Merge commit '577899a6458ccad9026eb268f10dc0b39c224c8d'

* commit '577899a6458ccad9026eb268f10dc0b39c224c8d':
  lavc: specify the behavior of av_lockmgr_register on failure.

Conflicts:
libavcodec/avcodec.h
libavcodec/utils.c
libavcodec/version.h

See: a950edb472e8823e34832c7313ba447b2db76f27
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoff_get_format: fix infinite loop
Rémi Denis-Courmont [Mon, 6 Oct 2014 14:41:00 +0000 (17:41 +0300)]
ff_get_format: fix infinite loop

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agolavc: specify the behavior of av_lockmgr_register on failure.
Manfred Georg [Thu, 2 Oct 2014 20:19:34 +0000 (13:19 -0700)]
lavc: specify the behavior of av_lockmgr_register on failure.

The register function now specifies that the user callback should
leave things in the same state that it found them on failure but
that failure to destroy is ignored by the library.  The register
function is now explicit about its behavior on failure
(it unregisters the previous callback and destroys all mutex).

Signed-off-by: Manfred Georg <mgeorg@google.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoavcodec/vdpau: do not dereference hwctx before checking it for NULL
Michael Niedermayer [Mon, 6 Oct 2014 15:39:28 +0000 (17:39 +0200)]
avcodec/vdpau: do not dereference hwctx before checking it for NULL

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '8de1d67967a9f9e22c66cb0c1e518ae4f30d07dd'
Michael Niedermayer [Mon, 6 Oct 2014 14:23:56 +0000 (16:23 +0200)]
Merge commit '8de1d67967a9f9e22c66cb0c1e518ae4f30d07dd'

* commit '8de1d67967a9f9e22c66cb0c1e518ae4f30d07dd':
  avconv_vdpau: update to new VDPAU interface

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/vdpau: fix render2() check
Michael Niedermayer [Mon, 6 Oct 2014 14:23:36 +0000 (16:23 +0200)]
avcodec/vdpau: fix render2() check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoffmpeg: add vdpau_old to allow continued testing of the older (but not oldest) API
Michael Niedermayer [Mon, 6 Oct 2014 13:27:19 +0000 (15:27 +0200)]
ffmpeg: add vdpau_old to allow continued testing of the older (but not oldest) API

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'bef067f88c74190cdf7e76d12f02e12e069974aa'
Michael Niedermayer [Mon, 6 Oct 2014 13:11:46 +0000 (15:11 +0200)]
Merge commit 'bef067f88c74190cdf7e76d12f02e12e069974aa'

* commit 'bef067f88c74190cdf7e76d12f02e12e069974aa':
  vdpau: check video surface and decoder capabilities

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'e3e158e81f0666b8fe66be9ce1cad63a535920e0'
Michael Niedermayer [Mon, 6 Oct 2014 13:04:03 +0000 (15:04 +0200)]
Merge commit 'e3e158e81f0666b8fe66be9ce1cad63a535920e0'

* commit 'e3e158e81f0666b8fe66be9ce1cad63a535920e0':
  vdpau: add av_vdpau_bind_context()

Conflicts:
doc/APIchanges
libavcodec/vdpau.h
libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '502cde409ca5ee97ef70c2cdede88b9101746ff6'
Michael Niedermayer [Mon, 6 Oct 2014 12:17:40 +0000 (14:17 +0200)]
Merge commit '502cde409ca5ee97ef70c2cdede88b9101746ff6'

* commit '502cde409ca5ee97ef70c2cdede88b9101746ff6':
  vdpau: force reinitialization when output resolution changes

Conflicts:
libavcodec/vdpau.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/vdpau: warn if the user application has not setup avctx->hwaccel_context...
Michael Niedermayer [Mon, 6 Oct 2014 12:10:37 +0000 (14:10 +0200)]
avcodec/vdpau: warn if the user application has not setup avctx->hwaccel_context instead of potentially crashing

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '89ac99ba5f2dc9f69ad3bc294753930eb0b3e4a4'
Michael Niedermayer [Mon, 6 Oct 2014 11:21:52 +0000 (13:21 +0200)]
Merge commit '89ac99ba5f2dc9f69ad3bc294753930eb0b3e4a4'

* commit '89ac99ba5f2dc9f69ad3bc294753930eb0b3e4a4':
  vdpau: pass codec-specific parameters from hwaccel

Conflicts:
libavcodec/vdpau.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/vdpau_internal: add comment to #endif
Michael Niedermayer [Mon, 6 Oct 2014 10:47:08 +0000 (12:47 +0200)]
avcodec/vdpau_internal: add comment to #endif

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'ce083282f0a8b7d63c4047c30b7bac498f9806dd'
Michael Niedermayer [Mon, 6 Oct 2014 10:32:07 +0000 (12:32 +0200)]
Merge commit 'ce083282f0a8b7d63c4047c30b7bac498f9806dd'

* commit 'ce083282f0a8b7d63c4047c30b7bac498f9806dd':
  vdpau: common support for managing the VdpDecoder in avcodec

Conflicts:
libavcodec/vdpau.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit 'fcc1022611f79c2f3aa2f392a5ce14c74be9c1d7'
Michael Niedermayer [Mon, 6 Oct 2014 10:04:25 +0000 (12:04 +0200)]
Merge commit 'fcc1022611f79c2f3aa2f392a5ce14c74be9c1d7'

* commit 'fcc1022611f79c2f3aa2f392a5ce14c74be9c1d7':
  vdpau: factor out common end-of-frame handling

Conflicts:
libavcodec/vdpau.c
libavcodec/vdpau_h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '319424d25c53f82b87187ce03ed984d438f1bee6'
Michael Niedermayer [Mon, 6 Oct 2014 09:38:06 +0000 (11:38 +0200)]
Merge commit '319424d25c53f82b87187ce03ed984d438f1bee6'

* commit '319424d25c53f82b87187ce03ed984d438f1bee6':
  vdpau: add helper for VDPAU to libav error codes conversion

Conflicts:
libavcodec/vdpau.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavconv_vdpau: update to new VDPAU interface
Rémi Denis-Courmont [Sat, 4 Oct 2014 13:55:09 +0000 (16:55 +0300)]
avconv_vdpau: update to new VDPAU interface

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agovdpau: check video surface and decoder capabilities
Rémi Denis-Courmont [Sat, 4 Oct 2014 13:55:08 +0000 (16:55 +0300)]
vdpau: check video surface and decoder capabilities

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agovdpau: add av_vdpau_bind_context()
Rémi Denis-Courmont [Sat, 4 Oct 2014 13:55:07 +0000 (16:55 +0300)]
vdpau: add av_vdpau_bind_context()

This function provides an explicit VDPAU device and VDPAU driver to
libavcodec, so that the application is relieved from codec specifics
and VdpDevice life cycle management.

A stub flags parameter is added for future extension. For instance, it
could be used to ignore codec level capabilities (if someone feels
dangerous).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agovdpau: force reinitialization when output resolution changes
Rémi Denis-Courmont [Sat, 4 Oct 2014 13:55:06 +0000 (16:55 +0300)]
vdpau: force reinitialization when output resolution changes

This is necessary to recreate the decoder with the correct parameters,
as not all codecs invoke get_format() in this case.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoswresample/swresample: replace always true if() by av_assert0()
Michael Niedermayer [Sun, 5 Oct 2014 23:29:15 +0000 (01:29 +0200)]
swresample/swresample: replace always true if() by av_assert0()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswresample/swresample: fix sample drop loop end condition
Michael Niedermayer [Sun, 5 Oct 2014 23:08:20 +0000 (01:08 +0200)]
swresample/swresample: fix sample drop loop end condition

Fixes Ticket3985

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mov: do not overwrite extradata in mov_read_glbl()
Michael Niedermayer [Sun, 5 Oct 2014 21:31:37 +0000 (23:31 +0200)]
avformat/mov: do not overwrite extradata in mov_read_glbl()

Fixes regression from Ticket3962

This basically favors the first global header while since 34751f8313a41bf94e004ffa9491f35d96763558
it was the last. If this heuristic turns out worse, do not hesitate to revert this and
reopen 3962 as a feature request for multiple STSD

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswscale: remove obsolete FF_API_SWS_FORMAT_NAME cruft
James Almer [Mon, 15 Sep 2014 00:46:20 +0000 (21:46 -0300)]
swscale: remove obsolete FF_API_SWS_FORMAT_NAME cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_READ_PACKET cruft
James Almer [Mon, 15 Sep 2014 00:28:09 +0000 (21:28 -0300)]
avformat: remove obsolete FF_API_READ_PACKET cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_CLOSE_INPUT_FILE cruft
James Almer [Mon, 15 Sep 2014 00:26:51 +0000 (21:26 -0300)]
avformat: remove obsolete FF_API_CLOSE_INPUT_FILE cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_SET_PTS_INFO cruft
James Almer [Mon, 15 Sep 2014 00:26:13 +0000 (21:26 -0300)]
avformat: remove obsolete FF_API_SET_PTS_INFO cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_NEW_STREAM cruft
James Almer [Mon, 15 Sep 2014 00:25:26 +0000 (21:25 -0300)]
avformat: remove obsolete FF_API_NEW_STREAM cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_FORMAT_PARAMETERS cruft
James Almer [Mon, 15 Sep 2014 00:24:35 +0000 (21:24 -0300)]
avformat: remove obsolete FF_API_FORMAT_PARAMETERS cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat: remove obsolete FF_API_ALLOC_OUTPUT_CONTEXT cruft
James Almer [Mon, 15 Sep 2014 00:23:44 +0000 (21:23 -0300)]
avformat: remove obsolete FF_API_ALLOC_OUTPUT_CONTEXT cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavutil: remove obsolete FF_API_INTFLOAT cruft
James Almer [Mon, 15 Sep 2014 00:21:42 +0000 (21:21 -0300)]
avutil: remove obsolete FF_API_INTFLOAT cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavutil: remove obsolete FF_API_SAMPLES_UTILS_RETURN_ZERO cruft
James Almer [Mon, 15 Sep 2014 00:17:03 +0000 (21:17 -0300)]
avutil: remove obsolete FF_API_SAMPLES_UTILS_RETURN_ZERO cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavutil: remove obsolete FF_API_FIND_OPT cruft
James Almer [Mon, 15 Sep 2014 00:15:33 +0000 (21:15 -0300)]
avutil: remove obsolete FF_API_FIND_OPT cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavutil: remove obsolete FF_API_GET_BITS_PER_SAMPLE_FMT cruft
James Almer [Mon, 15 Sep 2014 00:14:00 +0000 (21:14 -0300)]
avutil: remove obsolete FF_API_GET_BITS_PER_SAMPLE_FMT cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavcodec: remove obsolete FF_API_FAST_MALLOC cruft
James Almer [Sun, 14 Sep 2014 23:56:06 +0000 (20:56 -0300)]
avcodec: remove obsolete FF_API_FAST_MALLOC cruft

Signed-off-by: James Almer <jamrial@gmail.com>
4 years agoavformat/options_table: add FF_COMPLIANCE_UNOFFICIAL
Michael Niedermayer [Sun, 5 Oct 2014 19:43:17 +0000 (21:43 +0200)]
avformat/options_table: add FF_COMPLIANCE_UNOFFICIAL

Fixes ticket 3959

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoconfigure: add -lrt to libavutil when needed for nanosleep
Michael Niedermayer [Sat, 4 Oct 2014 10:32:04 +0000 (12:32 +0200)]
configure: add -lrt to libavutil when needed for nanosleep

This is similar to 7d97511e13ef30cd99bae0e36400de055b72918d

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264_mp4toannexb_bsf: reset the new IDR flag when SPS/PPS is seen.
Benoit Fouet [Tue, 30 Sep 2014 11:06:40 +0000 (13:06 +0200)]
avcodec/h264_mp4toannexb_bsf: reset the new IDR flag when SPS/PPS is seen.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/webp: add assert to ensure palette is not larger than 256
Michael Niedermayer [Sun, 5 Oct 2014 11:00:40 +0000 (13:00 +0200)]
avcodec/webp: add assert to ensure palette is not larger than 256

it should not be possible to be larger as its stored as 8bit value
but we would be overwriting a stack buffer if it is ...

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/webp: add optimization: use local palette with extra padding
Pascal Massimino [Mon, 22 Sep 2014 21:48:57 +0000 (14:48 -0700)]
avcodec/webp: add optimization: use local palette with extra padding

for big enough pictures.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agovdpau: pass codec-specific parameters from hwaccel
Rémi Denis-Courmont [Sat, 4 Oct 2014 13:55:05 +0000 (16:55 +0300)]
vdpau: pass codec-specific parameters from hwaccel

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agovdpau: common support for managing the VdpDecoder in avcodec
Rémi Denis-Courmont [Sat, 4 Oct 2014 13:55:04 +0000 (16:55 +0300)]
vdpau: common support for managing the VdpDecoder in avcodec

Using the not so new init and uninit callbacks, avcodec can now take
care of creating and destroying the VDPAU decoder instance.

The application is still responsible for creating the VDPAU device
and allocating video surfaces - this is necessary to keep video
surfaces on the GPU all the way to the output. But the application
will no longer needs to care about any codec-specific aspects.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agovdpau: factor out common end-of-frame handling
Rémi Denis-Courmont [Sat, 4 Oct 2014 13:55:03 +0000 (16:55 +0300)]
vdpau: factor out common end-of-frame handling

Also add error handling.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agovdpau: add helper for VDPAU to libav error codes conversion
Rémi Denis-Courmont [Sat, 4 Oct 2014 13:55:02 +0000 (16:55 +0300)]
vdpau: add helper for VDPAU to libav error codes conversion

Signed-off-by: Anton Khirnov <anton@khirnov.net>
4 years agoconfigure: Set large address aware.
Matthew Oliver [Sun, 5 Oct 2014 00:10:37 +0000 (11:10 +1100)]
configure: Set large address aware.

Enables >2GB memory usage for 32 bit compiles on Windows.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/img2dec: Attempt to detect non-escaped glob patterns too (-pattern_type...
Alexander Strasser [Sun, 5 Oct 2014 01:42:32 +0000 (03:42 +0200)]
avformat/img2dec: Attempt to detect non-escaped glob patterns too (-pattern_type glob)

Fixes ticket #3948

Based-on-patch-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '2a5ac99e6e06078713f684fee2466c91f677b303'
Michael Niedermayer [Sun, 5 Oct 2014 01:35:22 +0000 (03:35 +0200)]
Merge commit '2a5ac99e6e06078713f684fee2466c91f677b303'

* commit '2a5ac99e6e06078713f684fee2466c91f677b303':
  x11grab: Check the XQueryPointer return value

Conflicts:
libavdevice/x11grab.c

See: 69c34a6ac986e31b5286a1d566617ec25b93e6a7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '5b9c817dc7577b6d44acc94d73b9c77c52cda489'
Michael Niedermayer [Sun, 5 Oct 2014 01:22:55 +0000 (03:22 +0200)]
Merge commit '5b9c817dc7577b6d44acc94d73b9c77c52cda489'

* commit '5b9c817dc7577b6d44acc94d73b9c77c52cda489':
  x11grab: Check XFixesGetCursorImage return value

Conflicts:
libavdevice/x11grab.c

See: a65c0a3fe822386be30fd3371af9f0d008b02874

The warning with adjusted text is kept from a65c0a3fe822386be30fd3371af9f0d008b02874
but drawing the cursor is not disabled in case XFixesGetCursorImage() fails

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '89fa2b5616274194d90bde0aeebf6adbd1245193'
Michael Niedermayer [Sun, 5 Oct 2014 01:06:14 +0000 (03:06 +0200)]
Merge commit '89fa2b5616274194d90bde0aeebf6adbd1245193'

* commit '89fa2b5616274194d90bde0aeebf6adbd1245193':
  x11grab: Check for XFixes availability at runtime

See: a65c0a3fe822386be30fd3371af9f0d008b02874
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '68211c70afcfd4d675029cc85fba7dee8de53bdf'
Michael Niedermayer [Sun, 5 Oct 2014 00:57:37 +0000 (02:57 +0200)]
Merge commit '68211c70afcfd4d675029cc85fba7dee8de53bdf'

* commit '68211c70afcfd4d675029cc85fba7dee8de53bdf':
  vc1: Do not assume seek happens after decoding

See: 6801eb0a0981f113f5f09ed4799d9ae805af62a3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/img2dec: Support -loop with pipes
Michael Niedermayer [Sat, 4 Oct 2014 23:49:25 +0000 (01:49 +0200)]
avformat/img2dec: Support -loop with pipes

Fixes Ticket3976

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agox11grab: Check the XQueryPointer return value
Antonio Ospite [Thu, 25 Sep 2014 22:44:17 +0000 (00:44 +0200)]
x11grab: Check the XQueryPointer return value

The paint_mouse_pointer() code uses XFixes to retrieve the cursor
coordinates, but XFixes gives no information about which screen the
pointer is on; this results in always drawing the cursor on the
captured screen even if the mouse pointer was on another screen.

For example, when capturing from screen 1 (i.e. -f x11grab -i ":0.1")
the cursor was being drawn in the captured image even when the mouse
pointer was actually on screen 0, which is wrong and visually confusing.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agox11grab: Check XFixesGetCursorImage return value
Luca Barbato [Thu, 11 Sep 2014 12:28:44 +0000 (14:28 +0200)]
x11grab: Check XFixesGetCursorImage return value

It could return NULL if the cursor is outside the screen, the connection
timed out or the system is out of memory.

CC: libav-stable@libav.org
4 years agox11grab: Check for XFixes availability at runtime
Luca Barbato [Thu, 11 Sep 2014 12:15:08 +0000 (14:15 +0200)]
x11grab: Check for XFixes availability at runtime

4 years agovc1: Do not assume seek happens after decoding
Luca Barbato [Sat, 4 Oct 2014 10:40:35 +0000 (12:40 +0200)]
vc1: Do not assume seek happens after decoding

If a seek is requested before the decoding start there is no
current picture.

CC: libav-stable@libav.org
4 years agoavcodec/on2avc: Check number of channels
Michael Niedermayer [Sat, 4 Oct 2014 20:15:07 +0000 (22:15 +0200)]
avcodec/on2avc: Check number of channels

Fixes out of array access
Fixes: asan_heap-oob_4da4f3_7_asan_heap-oob_4da4f3_173_Xmen_avc_500.vp6

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '36f3aec3630f27df64f4ff2b52a1c9ced760eb52'
Michael Niedermayer [Sat, 4 Oct 2014 19:38:16 +0000 (21:38 +0200)]
Merge commit '36f3aec3630f27df64f4ff2b52a1c9ced760eb52'

* commit '36f3aec3630f27df64f4ff2b52a1c9ced760eb52':
  fate-vc1_ilaced_twomv: use -flags +bitexact

Conflicts:
tests/ref/fate/vc1_ilaced_twomv

See: 233d1acb7095b3dc89975cd4598c294cc4c08887
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agox86/hevc: get rid off packusdw for ssse3 compatibility
Mickaël Raulet [Mon, 25 Aug 2014 08:03:49 +0000 (10:03 +0200)]
x86/hevc: get rid off packusdw for ssse3 compatibility

cherry picked from commit df8ebe304df453f26c28ff8f11d607f49b90a4c2

Fixes out of array access
Fixes: asan_stack-oob_1046454_9_asan_stack-oob_15a9e7c_170_WP_MAIN10_B_Toshiba_3.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc: fix chroma transform_add size
Michael Niedermayer [Sat, 4 Oct 2014 14:17:32 +0000 (16:17 +0200)]
avcodec/hevc: fix chroma transform_add size

Fixes accessing misaligned address
Fixes: signal_sigsegv_1feb99c_10_signal_sigsegv_2d1d35c_79_cov_691940146_EXT_A_ericsson_3.bit

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavc/libx264: Fix compilation with libx264 version < 142.
Carl Eugen Hoyos [Sat, 4 Oct 2014 15:42:45 +0000 (17:42 +0200)]
lavc/libx264: Fix compilation with libx264 version < 142.

4 years agoavcodec/h264: Check mode before considering mixed mode intra prediction
Michael Niedermayer [Sat, 4 Oct 2014 12:51:46 +0000 (14:51 +0200)]
avcodec/h264: Check mode before considering mixed mode intra prediction

Fixes out of array read
Fixes: asan_heap-oob_e476fc_2_asan_heap-oob_1333ec6_61_CAMACI3_Sony_C.jsv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/assdec: make sure pos is initialized
Clément Bœsch [Sat, 4 Oct 2014 10:22:37 +0000 (12:22 +0200)]
avformat/assdec: make sure pos is initialized

Fixes use of uninitialized memory
Fixes: signal_sigsegv_504fb0_10_signal_sigsegv_504fb0_343_mewmew_ssa.avi

Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind
4 years agoMerge commit '7d97511e13ef30cd99bae0e36400de055b72918d'
Michael Niedermayer [Sat, 4 Oct 2014 10:04:51 +0000 (12:04 +0200)]
Merge commit '7d97511e13ef30cd99bae0e36400de055b72918d'

* commit '7d97511e13ef30cd99bae0e36400de055b72918d':
  configure: Add -lrt dependency to avutil's pc file.

Conflicts:
configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agofate-vc1_ilaced_twomv: use -flags +bitexact
Janne Grunau [Sat, 4 Oct 2014 09:19:09 +0000 (11:19 +0200)]
fate-vc1_ilaced_twomv: use -flags +bitexact

Also updates the reference since it was generated by the non-bitexact
x86 specific code.

4 years agoconfigure: Add -lrt dependency to avutil's pc file.
Josh Allmann [Fri, 3 Oct 2014 19:58:51 +0000 (12:58 -0700)]
configure: Add -lrt dependency to avutil's pc file.

This is needed for clock_gettime.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
4 years agoavformat/mpegts: use a padded buffer in read_sl_header()
Michael Niedermayer [Sat, 4 Oct 2014 03:14:08 +0000 (05:14 +0200)]
avformat/mpegts: use a padded buffer in read_sl_header()

Fixes overread
Fixes: asan_heap-oob_84f75d_8_asan_heap-oob_a2a00a_341_mbc.ts

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mpegts: Check desc_len / get8() return code
Michael Niedermayer [Sat, 4 Oct 2014 02:29:40 +0000 (04:29 +0200)]
avformat/mpegts: Check desc_len / get8() return code

Fixes out of array read
Fixes: signal_sigsegv_844d59_10_signal_sigsegv_a17bb7_366_mpegts_mpeg2video_mp2_dvbsub_topfield.rec

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/vorbisdec: Fix off by 1 error in ptns_to_read
Michael Niedermayer [Sat, 4 Oct 2014 01:12:34 +0000 (03:12 +0200)]
avcodec/vorbisdec: Fix off by 1 error in ptns_to_read

Fixes read of uninitialized memory
Fixes: asan_heap-uaf_18dac2b_9_asan_heap-uaf_22eb375_208_beta3_test_small.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agosdp: add support for H.261
Thomas Volkert [Fri, 3 Oct 2014 22:17:01 +0000 (00:17 +0200)]
sdp: add support for H.261

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/svq3: Dont memcpy AVFrame
Michael Niedermayer [Fri, 3 Oct 2014 22:13:26 +0000 (00:13 +0200)]
avcodec/svq3: Dont memcpy AVFrame

This avoids out of array accesses

Fixes: asan_heap-uaf_21f42e4_9_asan_heap-uaf_21f42e4_278_gl2.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/smc: fix off by 1 error
Michael Niedermayer [Fri, 3 Oct 2014 20:50:45 +0000 (22:50 +0200)]
avcodec/smc: fix off by 1 error

Fixes out of array access
Fixes: asan_heap-oob_1685bf0_5_asan_heap-oob_1f35116_430_smc.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoMerge commit '55f03d872640175a00bfa262da4652b7312b905f'
Michael Niedermayer [Fri, 3 Oct 2014 19:43:46 +0000 (21:43 +0200)]
Merge commit '55f03d872640175a00bfa262da4652b7312b905f'

* commit '55f03d872640175a00bfa262da4652b7312b905f':
  hlsenc: Add parameter -hls_allow_cache

Conflicts:
doc/muxers.texi
libavformat/hlsenc.c
libavformat/version.h

See: 3edb9aaea6aaa6b93d708693cfa6454c17e03732
Merged-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/qpeg: fix off by 1 error in MV bounds check
Michael Niedermayer [Fri, 3 Oct 2014 19:08:52 +0000 (21:08 +0200)]
avcodec/qpeg: fix off by 1 error in MV bounds check

Fixes out of array access
Fixes: asan_heap-oob_153760f_4_asan_heap-oob_1d7a4cf_164_VWbig6.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/gifdec: factorize interleave end handling out
Michael Niedermayer [Fri, 3 Oct 2014 18:15:52 +0000 (20:15 +0200)]
avcodec/gifdec: factorize interleave end handling out

also change it to a loop
Fixes out of array access
Fixes: asan_heap-oob_ca5410_8_asan_heap-oob_ca5410_97_ID_LSD_Size_Less_Then_Data_Inter_3.gif

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/cinepak: fix integer underflow
Michael Niedermayer [Fri, 3 Oct 2014 17:33:01 +0000 (19:33 +0200)]
avcodec/cinepak: fix integer underflow

Fixes out of array access
Fixes: asan_heap-oob_4da0ba_6_asan_heap-oob_4da0ba_241_cvid_crash.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agohlsenc: Add parameter -hls_allow_cache
Joakim Roubert [Fri, 19 Sep 2014 08:01:28 +0000 (10:01 +0200)]
hlsenc: Add parameter -hls_allow_cache

The -hls_allow_cache parameter enables explicitly setting the
EXT-X-ALLOW-CACHE tag in the manifest file. That tag indicates
whether the client MAY or MUST NOT cache downloaded media
segments for later replay.

Valid values are 1 (=YES) or 0 (=NO) and the EXT-X-ALLOW-CACHE
will not show in the manifest for other values (or if
-hls_allow_cache is not used.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 years agoavcodec/pngdec: Calculate MPNG bytewidth more defensively
Michael Niedermayer [Fri, 3 Oct 2014 15:54:21 +0000 (17:54 +0200)]
avcodec/pngdec: Calculate MPNG bytewidth more defensively

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/pngdec: Check bits per pixel before setting monoblack pixel format
Michael Niedermayer [Fri, 3 Oct 2014 15:35:58 +0000 (17:35 +0200)]
avcodec/pngdec: Check bits per pixel before setting monoblack pixel format

Fixes out of array accesses
Fixes: asan_heap-oob_14dbfcf_4_asan_heap-oob_1ce5767_179_add_method_small.png

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/tiff: more completely check bpp/bppcount
Michael Niedermayer [Fri, 3 Oct 2014 14:08:32 +0000 (16:08 +0200)]
avcodec/tiff: more completely check bpp/bppcount

Fixes pixel format selection
Fixes out of array accesses
Fixes: asan_heap-oob_1766029_6_asan_heap-oob_20aa045_332_cov_1823216757_m2-d1d366d7965db766c19a66c7a2ccbb6b.tif

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mmvideo: Bounds check 2nd line of HHV Intra blocks
Michael Niedermayer [Fri, 3 Oct 2014 12:45:04 +0000 (14:45 +0200)]
avcodec/mmvideo: Bounds check 2nd line of HHV Intra blocks

Fixes out of array access
Fixes: asan_heap-oob_4da4f3_8_asan_heap-oob_4da4f3_419_scene1a.mm

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoRevert "avformat/img2dec: reduce bmppipe probe score"
Michael Niedermayer [Fri, 3 Oct 2014 11:54:06 +0000 (13:54 +0200)]
Revert "avformat/img2dec: reduce bmppipe probe score"

This seems not needed anymore

This reverts commit 321c3cd1a97b9307760c3ebb175296590c382eca.

Found-by: carl