Commit Graph

61434 Commits

Author SHA1 Message Date
Michael Niedermayer
d20ac551a8 swresample/dither: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a5290cb1ac)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
352b0969e2 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 f9158b01d0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
b479b42b26 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 754f84663e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
36cab9c408 avcodec/pthread_frame: fix missing unlock on error
Fixes CID1197057
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f87b3d5523)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
34592d04fb examples/avio_reading: fix null dereference on error
Fixed CID1197052
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 419800acc4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
544accc895 avformat/omadec: fix probetest failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a84f9c75bc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
f41622ecb4 avcodec/wma: use av_freep(), do not leave stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d167faafe9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Lukasz Marek
fc8eb4c1f9 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 3aac5fcfa9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
02bae9f013 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 8710ee11d7)

Conflicts:

	libavcodec/h264_slice.c
2014-04-10 04:53:00 +02:00
Michael Niedermayer
5cb2a1c3f0 avfilter/vf_pullup: fix gray8
Fixes segfault
Fixes Ticket3469

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
a221c9bd76 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 64b79141bd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
b2583c2b62 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>
2014-04-10 04:46:00 +02:00
Michael Niedermayer
bd553941ae Merge commit 'a014b9614e6165fb8df9e756f46a95d516794678' into release/2.2
* commit 'a014b9614e6165fb8df9e756f46a95d516794678':
  Prepare for 10.1 Release

Conflicts:
	RELEASE

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:35:35 +02:00
Martin Storsjö
e0aa76d38a 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 508a84e672)
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-03-30 12:45:40 +03:00
Reinhard Tartler
a014b9614e Prepare for 10.1 Release 2014-03-29 13:03:59 -04:00
Andreas Cadhalpun
31c21d2f69 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 d473f2d18a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 11:20:56 +01:00
Andreas Cadhalpun
3cd1c8653b Fix texinfo error due to wrong @subsubsection
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cf3bfc970c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 11:20:56 +01:00
Michael Niedermayer
194485cfba avfilter/vf_pullup: zero freed memory for saftey
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a44409e692)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 11:20:56 +01:00
wm4
81cfe39113 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 5b0ce5d4e3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 11:20:56 +01:00
Michael Niedermayer
ef0c503d37 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 289b149cec)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 11:20:56 +01:00
James Almer
1103aec1df 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 2d9821a208)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 11:20:56 +01:00
Michael Niedermayer
b40ab81d1f avcodec/x86/mpegvideoenc_template: fix integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 11:20:56 +01:00
Michael Niedermayer
314f055c29 dox/scaler:fix bicubiclin typo
See Ticket3486

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 11:20:56 +01:00
Michael Niedermayer
2c566744c4 avcodec/vorbis: fix decoding of single element huffman trees
Fixes Ticket2893

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 11:20:56 +01:00
Michael Niedermayer
adad1ba5d8 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 5171ae781a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 11:20:56 +01:00
Michael Niedermayer
a80a7131d1 swscale/swscale: fix integer overflow
Should fix fate failure with clang ftrapv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-27 11:20:56 +01:00
Carl Eugen Hoyos
3ab63abbd4 Do not set swscale sizeFactor to -1.
Fixes ticket #3495.
(cherry picked from commit e6fe804bdd)
2014-03-26 11:05:41 +01:00
Michael Niedermayer
d2c76782e0 update for 2.2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n2.2
2014-03-23 21:13:49 +01:00
Andrey Myznikov
4dc8b4d7d0 Fix pthread-related compile errors in iec61883.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9deecdf85f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 21:01:50 +01:00
Michael Niedermayer
9ff0467566 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 82a90e7764)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
4407b38b28 swscale/x86/swscale: fix missing xmm clobbers in yuv2yuvX_sse3()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6c47a4e972)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
8caaf260a6 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 2dcaa1b9d1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
e1f51bbd1f 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 8b8ae298af)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
4b7c149306 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 6b53c1aa82)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
e8919d6522 Revert "mpegts: do not set pts for missing dts in video streams"
This reverts commit f65afef1df.

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 0bf882864e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
b017785fa5 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 171dd67520)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
01507eb1f8 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 9600486d10)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
938ff93710 avformat/aviobuf: factorize buffer_size out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2adf422ce2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
0c88d539f8 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 fc567ac49e)

Conflicts:

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
e39a992bd1 avformat/mp3enc: use av_copy_packet()
Fixes double free
Fixes Ticket3476

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
72a12f61ef avcodec/snowenc: allow larger mb variances
Fixes assertion failure
Fixes Ticket3463

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
30ae080e9d avcodec/ratecontrol: make (mc_)mb_var_sum(_last) 64bit
This avoids hypothetical integer overflows
(cherry picked from commit b4356c9cc2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
dca463b728 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 e92a78a409)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
25b462cab9 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 c3272674c9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
7c6a8afa7e 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 9dca02ee54)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
b052525f9b avcodec/mjpegdec: Switch default interlaced polarity for MJPG to 1
Fixes Ticket3229

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
90c7bfb9be 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 493296800c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:05 +01:00
Michael Niedermayer
7bdd348e58 avcodec/mjpeg: print info from parse_avid() if requested
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 046a75eea0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:04 +01:00
Michael Niedermayer
af3d003658 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 98f9aa389b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:04 +01:00
Michael Niedermayer
c00beff5e0 avcodec/mjpegdec: factorize parse_avid out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1083c479eb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-23 20:31:04 +01:00