ffmpeg.git
6 years agoMerge commit '79041d92ee7421853ee8c57fc13891cb0c272e0e' into release/2.2
Michael Niedermayer [Sun, 4 May 2014 19:25:27 +0000 (21:25 +0200)]
Merge commit '79041d92ee7421853ee8c57fc13891cb0c272e0e' into release/2.2

* commit '79041d92ee7421853ee8c57fc13891cb0c272e0e':
  matroska: add the Opus mapping

Conflicts:
libavformat/matroska.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '82cebc0e0544dce507749dd9b1c2983f083de836' into release/2.2
Michael Niedermayer [Sun, 4 May 2014 19:01:38 +0000 (21:01 +0200)]
Merge commit '82cebc0e0544dce507749dd9b1c2983f083de836' into release/2.2

* commit '82cebc0e0544dce507749dd9b1c2983f083de836':
  matroskadec: read the CodecDelay element

Conflicts:
libavformat/matroska.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit 'c4e764aa6980dd9dc7c423921b415ff7261c944a' into release/2.2
Michael Niedermayer [Sun, 4 May 2014 18:54:43 +0000 (20:54 +0200)]
Merge commit 'c4e764aa6980dd9dc7c423921b415ff7261c944a' into release/2.2

* commit 'c4e764aa6980dd9dc7c423921b415ff7261c944a':
  rtmpproto: Make sure to pass on the error code if read_connect failed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '9d02e38d3f03100784348ff75fd181d2aaad7e43' into release/2.2
Michael Niedermayer [Sun, 4 May 2014 18:14:18 +0000 (20:14 +0200)]
Merge commit '9d02e38d3f03100784348ff75fd181d2aaad7e43' into release/2.2

* commit '9d02e38d3f03100784348ff75fd181d2aaad7e43':
  lavr: allocate the resampling buffer with a positive size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '0f6e309b97e3da83a0fa75fbf1c4b50cd72047eb' into release/2.2
Michael Niedermayer [Sun, 4 May 2014 18:13:41 +0000 (20:13 +0200)]
Merge commit '0f6e309b97e3da83a0fa75fbf1c4b50cd72047eb' into release/2.2

* commit '0f6e309b97e3da83a0fa75fbf1c4b50cd72047eb':
  mp3enc: Properly write bitrate value in XING header

Conflicts:
libavformat/mp3enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomatroska: add the Opus mapping
Anton Khirnov [Sun, 27 Apr 2014 11:40:11 +0000 (13:40 +0200)]
matroska: add the Opus mapping

(cherry picked from commit 141fdc763c2841b572d29a2ad78513e8d5325870)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agomatroskadec: read the CodecDelay element
Anton Khirnov [Tue, 29 Apr 2014 10:03:13 +0000 (12:03 +0200)]
matroskadec: read the CodecDelay element

(cherry picked from commit eb3b5501e8b85bfea09d533314cb6920efc42639)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Conflicts:
libavformat/matroskadec.c

6 years agosws: dont use the optimized 410->420 unscaled conversion when height%4
Michael Niedermayer [Wed, 30 Apr 2014 04:21:58 +0000 (06:21 +0200)]
sws: dont use the optimized 410->420 unscaled conversion when height%4

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

6 years agoavcodec/vorbisdec: try to workaround libvorbisenc bug
Michael Niedermayer [Wed, 30 Apr 2014 02:12:29 +0000 (04:12 +0200)]
avcodec/vorbisdec: try to workaround libvorbisenc bug

Fixes Ticket3590

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

6 years agoswresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input
Michael Niedermayer [Wed, 23 Apr 2014 23:25:46 +0000 (01:25 +0200)]
swresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input

Fixes Ticket 3542

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

6 years agoavformat/mux: Check for and remove invalid packet durations
Michael Niedermayer [Wed, 23 Apr 2014 04:04:50 +0000 (06:04 +0200)]
avformat/mux: Check for and remove invalid packet durations

Fixes assertion failure
Fixes Ticket3575

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

6 years agoavformat/avidec: Speed up keyframe detection code
Michael Niedermayer [Tue, 22 Apr 2014 02:00:32 +0000 (04:00 +0200)]
avformat/avidec: Speed up keyframe detection code

Fixes Ticket3531

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

6 years agoffprobe: fix scaling of vali in value_string() in case -prefix is selected
Stefano Sabatini [Tue, 22 Apr 2014 11:01:14 +0000 (13:01 +0200)]
ffprobe: fix scaling of vali in value_string() in case -prefix is selected

Fix trac ticket #3523.
(cherry picked from commit 1ba59b1cbeafe7cd28db04f772abd89eb7e4ce1e)

6 years agoavformat/asfenc: dont allow non interleaved packets
Michael Niedermayer [Mon, 21 Apr 2014 00:39:00 +0000 (02:39 +0200)]
avformat/asfenc: dont allow non interleaved packets

The muxer does not support this currently

Fixes ticket #3547.
Fixes ticket #3555.

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

6 years agoavformat/pmpdec: remove cur_dts timestamp hack
Michael Niedermayer [Sun, 20 Apr 2014 22:58:24 +0000 (00:58 +0200)]
avformat/pmpdec: remove cur_dts timestamp hack

It appears the demuxer works fine without it

Fixes Ticket3534

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

6 years agoavformat: Fix decoder search in find stream info
Michael Niedermayer [Mon, 21 Apr 2014 01:38:07 +0000 (03:38 +0200)]
avformat: Fix decoder search in find stream info

Fixes Ticket3548

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

6 years agortmpproto: Make sure to pass on the error code if read_connect failed
Martin Storsjö [Sun, 13 Apr 2014 10:44:03 +0000 (13:44 +0300)]
rtmpproto: Make sure to pass on the error code if read_connect failed

Previously, if read_connect failed, the ret variable was unmodified
and had the value 0, indicating success, which then was returned from
the rtmp_open function, even though it actually failed.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 6477139721f559b26eafd415e23e13ea2b0c27e1)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agolavr: allocate the resampling buffer with a positive size
Anton Khirnov [Thu, 20 Mar 2014 19:40:24 +0000 (20:40 +0100)]
lavr: allocate the resampling buffer with a positive size

This fixes cases where very few input samples (fewer than needed for one
output sample) are passed to lavr at the beginning.
CC:libav-stable@libav.org

(cherry picked from commit ac976ed91e323754e9a84509873ebdb437372797)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agoff_id3v2_read: add option to limit ID3 magic number search
Peter Ross [Fri, 18 Apr 2014 04:49:40 +0000 (14:49 +1000)]
ff_id3v2_read: add option to limit ID3 magic number search

Several chunked formats (AIFF, IFF,DSF) store ID3 metadata within an 'ID3 '
chunk tag. If such chunks are stored sequentially, it is possible for the
ID3v2 parser to confuse the chunk tag for the ID3 magic number. e.g.

[1st chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...]
[2nd chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...]

Fixes ticket #3530.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5331773cc33ba26b9e26ace643d926219e46a17b)

Conflicts:
libavformat/dsfdec.c

6 years agoff_id3v2_free_extra_meta: set the pointer pointing to extra_meta to NULL
Peter Ross [Sat, 19 Apr 2014 02:12:00 +0000 (12:12 +1000)]
ff_id3v2_free_extra_meta: set the pointer pointing to extra_meta to NULL

Fixes ticket #3530.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c94305ae23318c8956a30485cd5642829f4f16a9)

6 years agoDo not overwrite VDPAU structures in ff_MPV_frame_start().
Carl Eugen Hoyos [Fri, 18 Apr 2014 02:56:34 +0000 (04:56 +0200)]
Do not overwrite VDPAU structures in ff_MPV_frame_start().

Fixes crashes with VDR and MPlayer as reported by irc user crow.
(cherry picked from commit 941b2240f2ce59c41f4a9ffec88c512f64c75613)

6 years agoFix compilation with --disable-everything --enable-muxer=avi --disable-network.
Anh [Wed, 16 Apr 2014 18:00:17 +0000 (20:00 +0200)]
Fix compilation with --disable-everything --enable-muxer=avi --disable-network.

Fixes ticket #3568.
(cherry picked from commit c150e2cf324ce0572bb8b9b3501c45465cfbf360)

6 years agoavutil/avstring: do not lose ascii characters when decoding non utf-8 with av_utf8_de...
Michael Niedermayer [Sat, 12 Apr 2014 18:01:33 +0000 (20:01 +0200)]
avutil/avstring: do not lose ascii characters when decoding non utf-8 with av_utf8_decode()

Fixes Ticket3363

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

6 years agoffprobe: do not lose non ascii characters in non utf8 strings
Michael Niedermayer [Sat, 12 Apr 2014 18:13:13 +0000 (20:13 +0200)]
ffprobe: do not lose non ascii characters in non utf8 strings

Fixes Ticket3363

Using U+FFFD REPLACEMENT CHARACTER as suggested by nicolas

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

6 years agomp3enc: Properly write bitrate value in XING header
Michael Niedermayer [Wed, 9 Apr 2014 16:22:53 +0000 (18:22 +0200)]
mp3enc: Properly write bitrate value in XING header

Instead of using a fixed bitrate_idx, calculate a matching bitrate for
the XING header.

Using a fixed bitrate_idx causes tools such as file(1) and mediainfo(1)
to report wrong bitrate and bitrate mode when using CBR.

Bug-Id: https://bugs.debian.org/736088

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 617a1a98a6be3e59db6fbfc21afab2fb9a049c03)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
6 years agolibx265: Use x265_param_parse to set the SAR
Derek Buitenhuis [Tue, 8 Apr 2014 17:44:53 +0000 (18:44 +0100)]
libx265: Use x265_param_parse to set the SAR

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
(cherry picked from commit 8945dcbb52b6b87e1e6479912cce89c7da54ec43)

Conflicts:
libavcodec/libx265.c

6 years agoupdate for 2.2.1 n2.2.1
Michael Niedermayer [Thu, 10 Apr 2014 03:09:51 +0000 (05:09 +0200)]
update for 2.2.1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/dirac_arith: Fix build with PIC and stack-check options
Anthoine Bourgeois [Wed, 9 Apr 2014 10:18:32 +0000 (12:18 +0200)]
avcodec/dirac_arith: Fix build with PIC and stack-check options

Fixes Ticket3540

The function dirac_get_arith_bit in libavcodec/dirac_arith.h can't be
built with PIC and check-stack because the asm code needs 6 registers
and PIC and check-stack options take 1 each and x86 is quite limited
in this area.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoswscale/x86/swscale_template: loose hardcoded dstw_offset
Michael Niedermayer [Tue, 8 Apr 2014 16:12:12 +0000 (18:12 +0200)]
swscale/x86/swscale_template: loose hardcoded dstw_offset

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoswresample/resample: use av_malloc_array() where appropriate
Michael Niedermayer [Mon, 7 Apr 2014 22:29:26 +0000 (00:29 +0200)]
swresample/resample: use av_malloc_array() where appropriate

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoswresample/dither: use av_malloc_array()
Michael Niedermayer [Mon, 7 Apr 2014 22:29:06 +0000 (00:29 +0200)]
swresample/dither: use av_malloc_array()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoswresample/resample: Limit filter length
Michael Niedermayer [Mon, 7 Apr 2014 22:19:07 +0000 (00:19 +0200)]
swresample/resample: Limit filter length

Related to CID1197063

The limit choosen is arbitrary and much larger than what makes sense.
It avoids the need for checking arithmetic operations with the length for overflow

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/msrle: check return code for success before use
Michael Niedermayer [Sun, 6 Apr 2014 02:01:24 +0000 (04:01 +0200)]
avcodec/msrle: check return code for success before use

The check is possibly redundant, but better to check for errors
that dont occur than to skip the check and crash

Fixes CID1197060

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/pthread_frame: fix missing unlock on error
Michael Niedermayer [Sun, 6 Apr 2014 01:51:46 +0000 (03:51 +0200)]
avcodec/pthread_frame: fix missing unlock on error

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoexamples/avio_reading: fix null dereference on error
Michael Niedermayer [Sat, 5 Apr 2014 22:39:58 +0000 (00:39 +0200)]
examples/avio_reading: fix null dereference on error

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat/omadec: fix probetest failure
Michael Niedermayer [Sat, 5 Apr 2014 20:07:43 +0000 (22:07 +0200)]
avformat/omadec: fix probetest failure

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/wma: use av_freep(), do not leave stale pointers in memory
Michael Niedermayer [Sat, 5 Apr 2014 19:34:03 +0000 (21:34 +0200)]
avcodec/wma: use av_freep(), do not leave stale pointers in memory

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agolavu/opt: validate range before dereference
Lukasz Marek [Fri, 4 Apr 2014 17:28:45 +0000 (19:28 +0200)]
lavu/opt: validate range before dereference

This change make error handling simplier.
av_opt_freep_ranges may be called when some ranges are NULL,
for example after memory allocation fail.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3aac5fcfa9d3748659d78ab2a66d0ccce22cfd4f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/h264: clear cur_pic structure instead of duplicating it in ff_h264_update_thr...
Michael Niedermayer [Thu, 3 Apr 2014 21:46:25 +0000 (23:46 +0200)]
avcodec/h264: clear cur_pic structure instead of duplicating it in ff_h264_update_thread_context()

Fixes crash

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

Conflicts:

libavcodec/h264_slice.c

6 years agoavfilter/vf_pullup: fix gray8
Michael Niedermayer [Mon, 31 Mar 2014 01:22:20 +0000 (03:22 +0200)]
avfilter/vf_pullup: fix gray8

Fixes segfault
Fixes Ticket3469

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/libx264: move where x264opts is applied down so it isnt overridden by avctx...
Michael Niedermayer [Thu, 27 Mar 2014 23:03:38 +0000 (00:03 +0100)]
avcodec/libx264: move where x264opts is applied down so it isnt overridden by avctx & defaults

fixes x264opts opengop=1

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit 'e0aa76d38a02090245284fc157afb9074e9ff073' into release/2.2
Michael Niedermayer [Thu, 10 Apr 2014 02:46:00 +0000 (04:46 +0200)]
Merge commit 'e0aa76d38a02090245284fc157afb9074e9ff073' into release/2.2

* commit 'e0aa76d38a02090245284fc157afb9074e9ff073':
  golomb: Fix the implementation of get_se_golomb_long

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit 'a014b9614e6165fb8df9e756f46a95d516794678' into release/2.2
Michael Niedermayer [Thu, 10 Apr 2014 02:35:35 +0000 (04:35 +0200)]
Merge commit 'a014b9614e6165fb8df9e756f46a95d516794678' into release/2.2

* commit 'a014b9614e6165fb8df9e756f46a95d516794678':
  Prepare for 10.1 Release

Conflicts:
RELEASE

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agogolomb: Fix the implementation of get_se_golomb_long
Martin Storsjö [Sat, 29 Mar 2014 10:35:11 +0000 (12:35 +0200)]
golomb: Fix the implementation of get_se_golomb_long

This was only used in hevc muxing code so far.

This makes the return values match what get_se_golomb returns for
the same bitstream reader instances.

The logic for producing a signed golomb code out of an unsigned one
was based on the corresponding code in get_se_golomb, which operated
directly on the bitstream reader buffer - not on the equivalent
return value from get_ue_golomb.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 508a84e6726ab94a740c160b30fd8162265d1fef)
Signed-off-by: Martin Storsjö <martin@martin.st>
6 years agoPrepare for 10.1 Release
Reinhard Tartler [Sat, 29 Mar 2014 17:03:59 +0000 (13:03 -0400)]
Prepare for 10.1 Release

6 years agoFix spelling errors in texi files: more informations --> more information allows...
Andreas Cadhalpun [Wed, 26 Mar 2014 18:24:35 +0000 (19:24 +0100)]
Fix spelling errors in texi files: more informations --> more information allows to --> allows one to

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoFix texinfo error due to wrong @subsubsection
Andreas Cadhalpun [Wed, 26 Mar 2014 18:13:35 +0000 (19:13 +0100)]
Fix texinfo error due to wrong @subsubsection

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavfilter/vf_pullup: zero freed memory for saftey
Michael Niedermayer [Wed, 26 Mar 2014 17:37:15 +0000 (18:37 +0100)]
avfilter/vf_pullup: zero freed memory for saftey

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agovf_pullup: simplify, fix double free error
wm4 [Tue, 25 Mar 2014 12:53:11 +0000 (13:53 +0100)]
vf_pullup: simplify, fix double free error

The memory allocation for f->diffs was freed multiple times in some
corner cases. Simplify the code so that this doesn't happen.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/h264_mp4toannexb_bsf: prepend global headers before any in stream parameter...
Michael Niedermayer [Wed, 26 Mar 2014 17:09:23 +0000 (18:09 +0100)]
avcodec/h264_mp4toannexb_bsf: prepend global headers before any in stream parameter sets

Fixes h264_mp4toannexb_bsf_failure.mkv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agox86/cpu: check for OS support before enabling AVX2
James Almer [Tue, 25 Mar 2014 08:27:08 +0000 (05:27 -0300)]
x86/cpu: check for OS support before enabling AVX2

AV_CPU_FLAG_AVX is enabled at this point only if there's OS support.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2d9821a2081aff5dca253386c6e7e71a04509cff)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/x86/mpegvideoenc_template: fix integer overflow
Michael Niedermayer [Mon, 24 Mar 2014 23:15:52 +0000 (00:15 +0100)]
avcodec/x86/mpegvideoenc_template: fix integer overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agodox/scaler:fix bicubiclin typo
Michael Niedermayer [Mon, 24 Mar 2014 21:04:52 +0000 (22:04 +0100)]
dox/scaler:fix bicubiclin typo

See Ticket3486

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/vorbis: fix decoding of single element huffman trees
Michael Niedermayer [Sat, 8 Mar 2014 04:13:05 +0000 (05:13 +0100)]
avcodec/vorbis: fix decoding of single element huffman trees

Fixes Ticket2893

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/vorbisdec: use the stored previous window type only when the actual previous...
Michael Niedermayer [Tue, 11 Mar 2014 19:45:29 +0000 (20:45 +0100)]
avcodec/vorbisdec: use the stored previous window type only when the actual previous is not known

Fixes Ticket3432

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoswscale/swscale: fix integer overflow
Michael Niedermayer [Mon, 24 Mar 2014 04:01:32 +0000 (05:01 +0100)]
swscale/swscale: fix integer overflow

Should fix fate failure with clang ftrapv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoDo not set swscale sizeFactor to -1.
Carl Eugen Hoyos [Tue, 25 Mar 2014 14:46:35 +0000 (15:46 +0100)]
Do not set swscale sizeFactor to -1.

Fixes ticket #3495.
(cherry picked from commit e6fe804bdd6272de633ecf3fc73e1aba6746f641)

6 years agoupdate for 2.2 n2.2
Michael Niedermayer [Sun, 23 Mar 2014 20:13:49 +0000 (21:13 +0100)]
update for 2.2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoFix pthread-related compile errors in iec61883.c
Andrey Myznikov [Wed, 5 Mar 2014 16:21:07 +0000 (18:21 +0200)]
Fix pthread-related compile errors in iec61883.c

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMove avpriv_find_pix_fmt() to utils.c
Michael Niedermayer [Sun, 23 Mar 2014 12:25:42 +0000 (13:25 +0100)]
Move avpriv_find_pix_fmt() to utils.c

Fixes build with --disable-everything

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoswscale/x86/swscale: fix missing xmm clobbers in yuv2yuvX_sse3()
Michael Niedermayer [Sat, 15 Mar 2014 21:52:22 +0000 (22:52 +0100)]
swscale/x86/swscale: fix missing xmm clobbers in yuv2yuvX_sse3()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat/utils: detect MPEG streams with faulty DTS and discard affected DTS
Michael Niedermayer [Mon, 3 Mar 2014 00:55:18 +0000 (01:55 +0100)]
avformat/utils: detect MPEG streams with faulty DTS and discard affected DTS

Fixes issue2.ts

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/g2meet: also reset local got_header when reseting the context got_header
Michael Niedermayer [Sun, 2 Mar 2014 14:18:09 +0000 (15:18 +0100)]
avcodec/g2meet: also reset local got_header when reseting the context got_header

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/g2meet: fix error returns
Michael Niedermayer [Sun, 2 Mar 2014 14:16:37 +0000 (15:16 +0100)]
avcodec/g2meet: fix error returns

Fixes out of array accesses

This should not affect any release

Fixes: 8ab69af9e5a7a7e20fe04cdd25c0d6e7-asan_heap-oob_e72b82_5505_cov_2278389485_g2m4.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6b53c1aa822e9c92be52a462dd0aef1c2010ce73)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoRevert "mpegts: do not set pts for missing dts in video streams"
Michael Niedermayer [Sun, 2 Mar 2014 11:41:10 +0000 (12:41 +0100)]
Revert "mpegts: do not set pts for missing dts in video streams"

This reverts commit f65afef1df49f53e14c8d4173ff960fff8d44ecb.

If only pts is coded then dts must be equal pts
See Rec. ITU-T H.222.0 (06/2012) / ISO/IEC 13818-1:2013 (E) 2.7.5

Found-by: Baptiste Coudurier
(cherry picked from commit 0bf882864ecd228d53555c57595eeca048662991)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat/mp3dec: optimize mp3_seek() for dir < 0
Michael Niedermayer [Sat, 1 Mar 2014 23:18:25 +0000 (00:18 +0100)]
avformat/mp3dec: optimize mp3_seek() for dir < 0

this minimizes the amount of protocol seeks and reading needed in that case

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat/aviobuf: optimize sequential backward seeking
Michael Niedermayer [Sat, 1 Mar 2014 22:09:40 +0000 (23:09 +0100)]
avformat/aviobuf: optimize sequential backward seeking

This reduces the number of protocol seeks

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat/aviobuf: factorize buffer_size out
Michael Niedermayer [Sat, 1 Mar 2014 21:55:37 +0000 (22:55 +0100)]
avformat/aviobuf: factorize buffer_size out

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec: Add padding after the remaining AVFrames
Michael Niedermayer [Mon, 17 Mar 2014 23:08:54 +0000 (00:08 +0100)]
avcodec: Add padding after the remaining AVFrames

This limits ABI issues in case libavcodec is linked to a libavutil with larger AVFrame
Which can happen if they are shiped in seperate binary packages and libavutil is upgraded

A cleaner alternative would be to replace them by pointers but this would likely cause
a small speedloss

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

Conflicts:

libavcodec/h264.h
(cherry picked from commit 618d062bd553a7d7fad194d4236913f2b0a0251e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavformat/mp3enc: use av_copy_packet()
Michael Niedermayer [Sat, 22 Mar 2014 00:26:48 +0000 (01:26 +0100)]
avformat/mp3enc: use av_copy_packet()

Fixes double free
Fixes Ticket3476

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/snowenc: allow larger mb variances
Michael Niedermayer [Fri, 21 Mar 2014 17:29:16 +0000 (18:29 +0100)]
avcodec/snowenc: allow larger mb variances

Fixes assertion failure
Fixes Ticket3463

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/ratecontrol: make (mc_)mb_var_sum(_last) 64bit
Michael Niedermayer [Fri, 21 Mar 2014 17:25:36 +0000 (18:25 +0100)]
avcodec/ratecontrol: make (mc_)mb_var_sum(_last) 64bit

This avoids hypothetical integer overflows
(cherry picked from commit b4356c9cc28197bb8da626ece08d4a062b62afc8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/mpegvideo: make mc_mb_var_sum / mb_var_sum 64bit
Michael Niedermayer [Fri, 21 Mar 2014 17:24:56 +0000 (18:24 +0100)]
avcodec/mpegvideo: make mc_mb_var_sum / mb_var_sum 64bit

This avoids a hypothetical integer overflow with very high resolution video

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/mpegvideo: make mc_mb_var_sum_temp / mb_var_sum_temp 64bit
Michael Niedermayer [Fri, 21 Mar 2014 17:12:58 +0000 (18:12 +0100)]
avcodec/mpegvideo: make mc_mb_var_sum_temp / mb_var_sum_temp 64bit

This avoids a hypothetical integer overflow with very high resolution video

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoffmpeg: dont call exit_program() from a signal hander
Michael Niedermayer [Fri, 21 Mar 2014 14:45:03 +0000 (15:45 +0100)]
ffmpeg: dont call exit_program() from a signal hander

This is unsafe and can deadlock amongth other things

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/mjpegdec: Switch default interlaced polarity for MJPG to 1
Michael Niedermayer [Wed, 19 Mar 2014 17:01:04 +0000 (18:01 +0100)]
avcodec/mjpegdec: Switch default interlaced polarity for MJPG to 1

Fixes Ticket3229

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/mjpegdec: parse avid data from extradata
Michael Niedermayer [Wed, 19 Mar 2014 16:59:42 +0000 (17:59 +0100)]
avcodec/mjpegdec: parse avid data from extradata

Makes no difference for any file tested but is needed
for following bug-fix

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/mjpeg: print info from parse_avid() if requested
Michael Niedermayer [Wed, 19 Mar 2014 16:59:02 +0000 (17:59 +0100)]
avcodec/mjpeg: print info from parse_avid() if requested

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/mjpegdec: switch interlaced_polarity to 0 for PAL AVID
Michael Niedermayer [Wed, 19 Mar 2014 16:57:59 +0000 (17:57 +0100)]
avcodec/mjpegdec: switch interlaced_polarity to 0 for PAL AVID

0 should have been the default, this change should make no difference
but this is needed for the following bugfix

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/mjpegdec: factorize parse_avid out
Michael Niedermayer [Wed, 19 Mar 2014 16:57:02 +0000 (17:57 +0100)]
avcodec/mjpegdec: factorize parse_avid out

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoavcodec/utils: fix sizeof(AVFrame) dependence in avcodec_encode_audio2()
Michael Niedermayer [Mon, 17 Mar 2014 23:07:53 +0000 (00:07 +0100)]
avcodec/utils: fix sizeof(AVFrame) dependence in  avcodec_encode_audio2()

This is a bit tricky, we allocate a correctly sized AVFrame but then only
copy the compile time AVFrame size, this is to ensure that user applications
which do not use the correct av frame API dont end with out of array reads.
Note, applications using the correct API have set extended_data and the
changed code will never be executed for them.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agolavd/xv: take aspect ratio into account.
Nicolas George [Mon, 25 Nov 2013 16:26:07 +0000 (17:26 +0100)]
lavd/xv: take aspect ratio into account.
(cherry picked from commit c37bbe54f400edc8cb0070138328048943e90b1a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agolavc/pthread: copy packet side data.
Nicolas George [Thu, 20 Feb 2014 19:52:06 +0000 (20:52 +0100)]
lavc/pthread: copy packet side data.
(cherry picked from commit ea6825fd090ef3f8edbce506d2fbf6e187f585fa)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit 'f25e6e0c255a6d81971fe66f6c32d29be0706f3d' into release/2.2
Michael Niedermayer [Sun, 23 Mar 2014 19:11:49 +0000 (20:11 +0100)]
Merge commit 'f25e6e0c255a6d81971fe66f6c32d29be0706f3d' into release/2.2

* commit 'f25e6e0c255a6d81971fe66f6c32d29be0706f3d':
  RELEASE_NOTES: mention new filters

Conflicts:
doc/RELEASE_NOTES

Not merged as these things where in past ffmpeg releases already.
    Or at least some of them where, volunteers to checks this and update
    our release notes are welcome

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoAlways pass the configure option sysroot to --sysroot and -isysroot.
Carl Eugen Hoyos [Sun, 23 Mar 2014 16:57:32 +0000 (17:57 +0100)]
Always pass the configure option sysroot to --sysroot and -isysroot.

On darwin, --sysroot may be ignored.

(cherry picked from commit cc6d549adbb838ef87b1f251ca469dc4c3dd39aa)

6 years agoMerge commit '80239a8bb11f730d95f03dfbd0deab258b413b0e' into release/2.2
Michael Niedermayer [Sun, 23 Mar 2014 18:56:37 +0000 (19:56 +0100)]
Merge commit '80239a8bb11f730d95f03dfbd0deab258b413b0e' into release/2.2

* commit '80239a8bb11f730d95f03dfbd0deab258b413b0e':
  af_channelmap: fix ONE_STR mapping mode

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '26bbc1c242ebfeec3c49585207efac7293632433' into release/2.2
Michael Niedermayer [Sun, 23 Mar 2014 18:54:52 +0000 (19:54 +0100)]
Merge commit '26bbc1c242ebfeec3c49585207efac7293632433' into release/2.2

* commit '26bbc1c242ebfeec3c49585207efac7293632433':
  Prepare for 10 Release

Conflicts:
RELEASE

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoAutodetect VDA like all other hardware acccelerations.
Carl Eugen Hoyos [Sun, 23 Mar 2014 12:24:07 +0000 (13:24 +0100)]
Autodetect VDA like all other hardware acccelerations.

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

Conflicts:
configure

6 years agoRELEASE_NOTES: mention new filters
Vittorio Giovara [Sun, 23 Mar 2014 16:28:34 +0000 (17:28 +0100)]
RELEASE_NOTES: mention new filters

6 years agoaf_channelmap: fix ONE_STR mapping mode
Anton Khirnov [Tue, 4 Mar 2014 06:19:46 +0000 (07:19 +0100)]
af_channelmap: fix ONE_STR mapping mode

get_channel() returns 0 on success

CC:libav-stable@libav.org
(cherry picked from commit e843612695007cc623813073754c651ab43021f7)

6 years agoPrepare for 10 Release
Reinhard Tartler [Sun, 23 Mar 2014 15:38:38 +0000 (11:38 -0400)]
Prepare for 10 Release

6 years agoMerge commit '29d61d73b1cbf0dcd1f79bc49c7df01b0a377c85' into release/2.2
Michael Niedermayer [Sun, 23 Mar 2014 03:05:56 +0000 (04:05 +0100)]
Merge commit '29d61d73b1cbf0dcd1f79bc49c7df01b0a377c85' into release/2.2

* commit '29d61d73b1cbf0dcd1f79bc49c7df01b0a377c85':
  movenc: Allow override of major brand in ftyp atom

Conflicts:
libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '9a6a7109985cbd3a20707b40cc31ed53a174195c' into release/2.2
Michael Niedermayer [Sun, 23 Mar 2014 02:20:00 +0000 (03:20 +0100)]
Merge commit '9a6a7109985cbd3a20707b40cc31ed53a174195c' into release/2.2

* commit '9a6a7109985cbd3a20707b40cc31ed53a174195c':
  matroskaenc: enable Annex B to MP4 conversion for HEVC tracks.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit 'daaef403d122b35d87b27d6b369d287b1ed06973' into release/2.2
Michael Niedermayer [Sun, 23 Mar 2014 02:14:03 +0000 (03:14 +0100)]
Merge commit 'daaef403d122b35d87b27d6b369d287b1ed06973' into release/2.2

* commit 'daaef403d122b35d87b27d6b369d287b1ed06973':
  matroskaenc: write private data in hvcC format for HEVC.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '0f42e06651c9c4d7581b70b9ad2b160c2525094f' into release/2.2
Michael Niedermayer [Sun, 23 Mar 2014 02:12:28 +0000 (03:12 +0100)]
Merge commit '0f42e06651c9c4d7581b70b9ad2b160c2525094f' into release/2.2

* commit '0f42e06651c9c4d7581b70b9ad2b160c2525094f':
  doc: Point to the correct, actually maintained gas-preprocessor repo

Conflicts:
doc/platform.texi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agoMerge commit '230c4c6ad9f74697e77351d32e679bf0c24478ea' into release/2.2
Michael Niedermayer [Sun, 23 Mar 2014 02:11:19 +0000 (03:11 +0100)]
Merge commit '230c4c6ad9f74697e77351d32e679bf0c24478ea' into release/2.2

* commit '230c4c6ad9f74697e77351d32e679bf0c24478ea':
  armv6: vp8: use explicit labels in motion compensation asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
6 years agomovenc: Allow override of major brand in ftyp atom
John Stebbins [Tue, 18 Mar 2014 13:11:00 +0000 (13:11 +0000)]
movenc: Allow override of major brand in ftyp atom

Signed-off-by: Tim Walker <tdskywalker@gmail.com>
(cherry picked from commit 1e9db41e2a2166be5671b088ef4ad06a40af459f)

6 years agomatroskaenc: enable Annex B to MP4 conversion for HEVC tracks.
Tim Walker [Mon, 3 Mar 2014 14:53:45 +0000 (14:53 +0000)]
matroskaenc: enable Annex B to MP4 conversion for HEVC tracks.

(cherry picked from commit 558b20d729bc296d8e6a69f03cd509ad26a4827d)

6 years agomatroskaenc: write private data in hvcC format for HEVC.
Tim Walker [Mon, 3 Mar 2014 14:53:44 +0000 (14:53 +0000)]
matroskaenc: write private data in hvcC format for HEVC.

(cherry picked from commit a823d0948683bd97dd58556b5740e434166209a8)

6 years agoAdd APIchanges entry and bump libswscale micro version for making gray16 full-scale.
Carl Eugen Hoyos [Wed, 19 Mar 2014 08:14:53 +0000 (09:14 +0100)]
Add APIchanges entry and bump libswscale micro version for making gray16 full-scale.