Commit Graph

68895 Commits

Author SHA1 Message Date
Luca Barbato
52a9f668ee librtmp: Avoid an infiniloop setting connection arguments
The exit condition was missing.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
(cherry picked from commit e85d38c20a)
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2016-07-26 12:08:15 -07:00
James Almer
5141a0ceaf avformat/oggparsevp8: fix pts calculation on pages ending with an invisible frame
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 5adfbd3918)
2016-07-25 09:59:25 -03:00
Michael Niedermayer
95a8dace5c avformat/ffmdec: Check pix_fmt
Fixes crash
Fixes Ticket5412

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 78baa450d9)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Michael Niedermayer
fb15a0f42a avcodec/ttaenc: Reallocate packet if its too small
Fixes assertion failure
Fixes Ticket5394

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 005c61c6b8)

Conflicts:

	libavcodec/ttaenc.c
2016-05-01 05:00:45 +02:00
Jan Ekström
cba830c463 pgssubdec: fix subpicture output colorspace and range
Functionality used before didn't widen the values from limited to
full range. Additionally, now the decoder uses BT.709 where it
should be used according to the video resolution.

Default for not yet set colorimetry is BT.709 due to most observed
HDMV content being HD.

BT.709 coefficients were gathered from the first two parts of BT.709
to BT.2020 conversion guide in ARIB STD-B62 (Pt. 1, Chapter 6.2.2).
They were additionally confirmed by manually calculating values.

Fixes #4637
(cherry picked from commit 9779b62624)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Michael Niedermayer
7e5e531ec6 avcodec/ac3dec: Reset SPX when switching from EAC3 to AC3
Fixes Ticket5319

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9ac154d1fa)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Michael Niedermayer
1d3843fc93 avfilter/vf_drawtext: Check return code of load_glyph()
Fixes segfault
Fixes Ticket5347

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2e67a99fbc)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Paul B Mahol
e196cd5234 avcodec/takdec: add code that got somehow lost in process of REing
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 38797a8033)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Paul B Mahol
72b600de29 avcodec/apedec: fix decoding of stereo files with one channel full of silence
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 9149e9c0ba)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Michael Niedermayer
9ae85f1468 avcodec/avpacket: Fix off by 5 error
Fixes out of array read
Fixes: mozilla bug 1266129
Found-by: Tyson Smith
Tested-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9f36ea57ae)

Conflicts:

	libavcodec/avpacket.c
2016-05-01 05:00:45 +02:00
Ivan
2bb9f5d607 avcodec/h264: Fix for H.264 configuration parsing
Sometimes video fails to decode if H.264 configuration changes mid stream.
The reason is that configuration parser assumes that nal_ref_idc is equal to 11b
while actually some codecs but 01b there. The H.264 spec is somewhat
vague about this but it looks like it allows any non-zero nal_ref_idc for sps/pps.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3a727606c4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Michael Niedermayer
1e46629234 avcodec/bmp_parser: Ensure remaining_size is not too small in startcode packet crossing corner case
Fixes Ticket 5438

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8e26bdd59b)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Marios Titas
dc751a55e5 avfilter/src_movie: fix how we check for overflows with seek_point
Currently, if the movie source filter is used and a seek_point is
specified on a file that has a negative start time, ffmpeg will fail.

An easy way to reproduce this is as follows:
$ ffmpeg -vsync passthrough -filter_complex 'color=d=10,setpts=PTS-1/TB' test.mp4
$ ffmpeg -filter_complex 'movie=filename=test.mp4:seek_point=2' -f null -

The problem is caused by checking for int64_t overflow the wrong way.
In general, to check whether a + b overflows, it is not enough to do:
    a > INT64_MAX - b
because b might be negative; the correct way is:
    b > 0 && > a > INT64_MAX - b

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c1f9734f97)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Aaron Boxer
eae0a6582d avcodec/j2kenc: Add attribution to OpenJPEG project:
http://ghostscript.com/~tor/gs-browse/gs/openjpeg/libopenjpeg/t1.c

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b6b4b0a65e)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Michael Niedermayer
7b551ba732 avcodec/libutvideodec: copy frame so it has reference counters when refcounted_frames is set
Reviewed-by: maintainer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0cd9ff4e3a)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Ico Doornekamp
f41e7b14db avformat/rtpdec_jpeg: fix low contrast image on low quality setting
Original mail and my own followup on ffmpeg-user earlier today:

I have a device sending out a MJPEG/RTP stream on a low quality setting.
Decoding and displaying the video with libavformat results in a washed
out, low contrast, greyish image. Playing the same stream with VLC results
in proper color representation.

Screenshots for comparison:

  http://zevv.nl/div/libav/shot-ffplay.jpg
  http://zevv.nl/div/libav/shot-vlc.jpg

A pcap capture of a few seconds of video and SDP file for playing the
stream are available at

  http://zevv.nl/div/libav/mjpeg.pcap
  http://zevv.nl/div/libav/mjpeg.sdp

I believe the problem might be in the calculation of the quantization
tables in the function create_default_qtables(), the attached patch
solves the issue for me.

The problem is that the argument 'q' is of the type uint8_t. According to the
JPEG standard, if 1 <= q <= 50, the scale factor 'S' should be 5000 / Q.
Because the create_default_qtables() reuses the variable 'q' to store the
result of this calculation, for small values of q < 19, q wil subsequently
overflow and give wrong results in the calculated quantization tables. The
patch below uses a new variable 'S' (same name as in RFC2435) with the proper
range to store the result of the division.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e3e6a2cff4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Michael Niedermayer
2cdeb2c4f8 avcodec/mjpegenc_common: Store approximate aspect if exact cannot be stored
Fixes Ticket5244

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 068026b0f7)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Michael Niedermayer
e1d771e818 avcodec/resample: Remove disabled and faulty code
Fixes Ticket5345

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 50ef7361cb)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:45 +02:00
Luca Barbato
d604b84f91 indeo2: Fix banding artefacts
Rename luma table to delta table and change how it is used.

CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit f8c34f4b8d)
(cherry picked from commit 73f3c8f73e)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Luca Barbato
55937c49df indeo2data: K&R formatting cosmetics
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit d4066a7024)
(cherry picked from commit 522ab0b9a9)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Przemysław Sobala
bbc3395a0b avcodec/imgconvert: Support non-planar colorspaces while padding
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0d097a869c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Michael Niedermayer
3097c10ee3 avutil/random_seed: Add the runtime in cycles of the main loop to the entropy pool
This should theoretically improve the randomness slightly

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2540d884f3)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Martin Cracauer
3433e52d48 avutil/channel_layout: AV_CH_LAYOUT_6POINT1_BACK not reachable in parsing
Trying to make heads and tails out of DTS 6.1 I can across this typo.

I also noticed that this wiki page is incorrect or misleading, the
channel order for 6.1 given does not match the source code.  At the
least it should be clarified that the layout given does not apply to
DTS.  https://trac.ffmpeg.org/wiki/AudioChannelManipulation

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 73d1398f0c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Michael Niedermayer
59648ab954 avformat/concatdec: set safe mode to enabled instead of auto
This is safer, as a selected demuxer could still mean that it was auto-detected
by a user application

Reviewed-previously-by: Nicolas George <george@nsup.org>
Reviewed-previously-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 689211d572)

Conflicts:

	libavformat/concatdec.c
2016-05-01 05:00:44 +02:00
Boris Nagels
1578642853 avformat/rtpenc: Fix integer overflow in NTP_TO_RTP_FORMAT
RTCP synchronization packet was broken since commit in ffmpeg version > 2.8.3
(commit: e04b039b15) Since this commit (2e814d0329)
"rtpenc: Simplify code by introducing a macro for rescaling NTP timestamps", NTP_TO_RTP_FORMAT
uses av_rescale_rnd() function to add the data to the packet.

This causes an overflow in the av_rescale_rnd() function and it will return INT64_MIN.
Causing the NTP stamp in the RTCP packet to have an invalid value.

Github: Closes #182

Reverting commit '2e814d0329aded98c811d0502839618f08642685' solves the problem.
(cherry picked from commit 1109ed7973)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Rodger Combs
b42ade51eb lavf/mov: fix sidx with edit lists
(cherry picked from commit 3617e69d50)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Michael Niedermayer
4c68706958 avcodec/mjpegdec: Fix decoding slightly odd progressive jpeg
Fixes: ebd58db6-dc86-11e5-91c2-59daeddf50c7.jpg

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c6f4720b86)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Michael Niedermayer
0438cc2bc0 avcodec/avpacket: clear priv in av_init_packet()
This should fix leaving uninitialized pointers in priv which can confuse
user applications.
See: https://github.com/golang/go/issues/14426

Only or release branches

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Michael Niedermayer
0b51d15a0e swscale/utils: Fix chrSrcHSubSample for GBRAP16
Fixes part of Ticket5264

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 67e5bd0c50)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Michael Niedermayer
8c40fc62ce swscale/input: Fix GBRAP16 input
Fixes part of Ticket5264

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit df36257a53)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Carl Eugen Hoyos
d8586b7aca postproc: fix unaligned access
Based on 59074310 by Andreas Cadhalpun.
Fixes ticket #5259.
(cherry picked from commit 2aa21eec1a)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Michael Niedermayer
e44775580f avutil/pixdesc: Make get_color_type() aware of CIE XYZ formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1ec7a70380)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Michael Niedermayer
39664fb647 swscale/x86/output: Fix yuv2planeX_16* with unaligned destination
Reviewed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f6492a2ea8)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Michael Niedermayer
a3db73c44d swscale/x86/output: Move code into yuv2planeX_mainloop
Reviewed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d07f6e5f1c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
KO Myung-Hun
3b931399eb MAINTAINERS: add myself as an OS/2 maintainer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 346ec91764)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-01 05:00:44 +02:00
Paul B Mahol
c40ee0a107 doc/utils: fix typo for min() description
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit bdf474bcff)
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
2016-03-02 16:45:05 -08:00
Michael Niedermayer
60eebbbf22 Update for 2.5.11
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-01 20:44:56 +01:00
Michael Niedermayer
5eca7ba16b MAINTAINERS: remove unmaintained releases
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:45:17 +01:00
Michael Niedermayer
69e191f854 avcodec/jpeg2000dec: More completely check cdef
Fixes out of array access
Fixes: j2k-poc.bin

Found-by: Lucas Leong <wmliang.tw@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0aada30510)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:52 +01:00
Michael Niedermayer
3fa6ecca76 avutil/opt: check for and handle errors in av_opt_set_dict2()
Previously errors could result in random entries to be lost.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f3ace85d88)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:52 +01:00
Paul B Mahol
d7c0287fbd avcodec/flacenc: fix calculation of bits required in case of custom sample rate
Sample rate of 11025 takes 16 bits but previous code would pick only 8.
Fixes assertion failure.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 3e7d684912)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:52 +01:00
Michael Niedermayer
7bcf142c02 avformat: Document urls a bit
Spell-checked-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3130556c0e)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:52 +01:00
Michael Niedermayer
0251cd6cf3 avformat/libquvi: Set default demuxer and protocol limitations
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 15cc98a0f3)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:52 +01:00
Michael Niedermayer
dde76f2d04 avformat/concat: Check protocol prefix
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8e32d01432)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:52 +01:00
Michael Niedermayer
e46999ccf4 doc/demuxers: Document enable_drefs and use_absolute_path
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9a8034b8bc)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:52 +01:00
Michael Niedermayer
58ea532cad avcodec/mjpegdec: Check for end for both bytes in unescaping
Fixes assertion failure
Fixes: c40c779601b77dc6e19aaea0b04b9751/signal_sigabrt_7ffff6ae7cb7_5769_b94f6ec70caecb2d3d76b4771b109ac1.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 509c9e74e5)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:52 +01:00
Michael Niedermayer
0ec1ffcb4d avcodec/mpegvideo_enc: Check for integer overflow in ff_mpv_reallocate_putbitbuffer()
Fixes assertion failure
Fixes: 6568d187979ce17878b6fe5fbbb89142/signal_sigabrt_7ffff6ae7cb7_7176_564bbc6741bdcf907f5c4e685c9a77a2.mpg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b65efbc0f4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:51 +01:00
Michael Niedermayer
2df2c0aab0 avformat/avformat: Replace some references to filenames by urls
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 41e07390e0)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:51 +01:00
Michael Niedermayer
65bb07d4be avcodec/wmaenc: Check ff_wma_init() for failure
Fixes null pointer dereference
Fixes: c4faf8280ba366bf00a79d425f2910a8/signal_sigsegv_1f96477_5177_1448ba7e4125faceb966f44ceb69abfa.qcp
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 19e456d48c)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:51 +01:00
Michael Niedermayer
3fc75e79cf avcodec/mpeg12enc: Move high resolution thread check to before initializing threads
Cleaner solution is welcome!

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a53fbda9dc)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-31 00:24:51 +01:00