ffmpeg.git
7 years agolavc/libvorbisdec: do not return empty frames.
Nicolas George [Tue, 3 Sep 2013 18:05:06 +0000 (20:05 +0200)]
lavc/libvorbisdec: do not return empty frames.

Some parts of the code have been known to react badly to
empty frames; they should not, but there is no need to
take risks.

7 years agotools: add benchmark for crypto functions.
Nicolas George [Thu, 16 May 2013 18:10:11 +0000 (20:10 +0200)]
tools: add benchmark for crypto functions.

The benchmark tests the speed of the following algorithms:
MD5, SHA-1, SHA-256, SHA-512, RIPEMD-160, AES-128.

It can optionally be built to perform the same benchmark on
other crypto libraries, for comparison purposes.
The supported libraries are:
- crypto:   OpenSSL's libcrypto;
- gcrypt:   GnuTLS's libgcrypt;
- tomcrypt: LibTomCrypt
To enable them, use this syntax:
make VERSUS=crypto+gcrypt+tomcrypt tools/crypto_bench
They do not need to have been enabled in configure.

7 years agodoc/examples: fix lib math dep for resampling_audio.
Clément Bœsch [Wed, 4 Sep 2013 13:49:18 +0000 (15:49 +0200)]
doc/examples: fix lib math dep for resampling_audio.

It uses at least sin()

7 years agoavcodec: fix AVpacket → AVPacket typo.
Clément Bœsch [Wed, 4 Sep 2013 13:48:11 +0000 (15:48 +0200)]
avcodec: fix AVpacket → AVPacket typo.

7 years agodoc/examples: remove extra "the".
Clément Bœsch [Wed, 4 Sep 2013 13:46:01 +0000 (15:46 +0200)]
doc/examples: remove extra "the".

"into the doc/examples directory" vs "into doc/examples".

7 years agoavcodec: add emuedge_linesize_type
Michael Niedermayer [Wed, 4 Sep 2013 12:22:20 +0000 (14:22 +0200)]
avcodec: add emuedge_linesize_type

Currently all uses of the emu edge code as well as the code itself
assume int linesize
changing some but not changing all would introduce a security issue
once all use this typedef a simple search and replace can be
done to switch them all to ptrdiff_t

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Wed, 4 Sep 2013 12:11:29 +0000 (14:11 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  mpegvideo: Avoid 32-bit wrapping of linesize multiplications

This is not merged as its not correct for ffmpeg and would introduce a
security issue if merged as is.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '0ebfdae099d2749240b6a565abcdf0bf62589748'
Michael Niedermayer [Wed, 4 Sep 2013 12:06:46 +0000 (14:06 +0200)]
Merge commit '0ebfdae099d2749240b6a565abcdf0bf62589748'

* commit '0ebfdae099d2749240b6a565abcdf0bf62589748':
  doc: Describe TB option of setpts filter

Conflicts:
doc/filters.texi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'b4ec7a5fee644ad9882e10c097817b65447b8e55'
Michael Niedermayer [Wed, 4 Sep 2013 11:48:29 +0000 (13:48 +0200)]
Merge commit 'b4ec7a5fee644ad9882e10c097817b65447b8e55'

* commit 'b4ec7a5fee644ad9882e10c097817b65447b8e55':
  mem: Document the av_realloc family of functions properly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agompegvideo: Avoid 32-bit wrapping of linesize multiplications
Martin Storsjö [Tue, 3 Sep 2013 22:36:51 +0000 (01:36 +0300)]
mpegvideo: Avoid 32-bit wrapping of linesize multiplications

This makes sure that linesize * start_y doesn't overflow, so that
emulated_edge_mc can get back the original value if needed.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoMerge commit '7f9e893f56db52078e0f46677ed337b2e25fa94d'
Michael Niedermayer [Wed, 4 Sep 2013 11:15:00 +0000 (13:15 +0200)]
Merge commit '7f9e893f56db52078e0f46677ed337b2e25fa94d'

* commit '7f9e893f56db52078e0f46677ed337b2e25fa94d':
  build: Report an error message when a pc file is not found

Conflicts:
configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'af11fa5409cc72fc45ca7f3527400beca10967b9'
Michael Niedermayer [Wed, 4 Sep 2013 11:04:29 +0000 (13:04 +0200)]
Merge commit 'af11fa5409cc72fc45ca7f3527400beca10967b9'

* commit 'af11fa5409cc72fc45ca7f3527400beca10967b9':
  mjpegb: Detect changing number of planes in interlaced video

Conflicts:
libavcodec/mjpegdec.c

See: ecc31630f9a16ead4272a078c281afcb4db87f21
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '35cbc98b720db95b923cb2d745f77bb2ee4363dc'
Michael Niedermayer [Wed, 4 Sep 2013 10:56:28 +0000 (12:56 +0200)]
Merge commit '35cbc98b720db95b923cb2d745f77bb2ee4363dc'

* commit '35cbc98b720db95b923cb2d745f77bb2ee4363dc':
  alac: Check that the channels fit at the given offset

Conflicts:
libavcodec/alac.c

See: b53f89710b03c4c832bb03e4e132b1ace17fb4e4
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agodoc: Describe TB option of setpts filter
Clifford Wolf [Sun, 1 Sep 2013 09:07:17 +0000 (11:07 +0200)]
doc: Describe TB option of setpts filter

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agoMerge commit 'd719981273bc779c7d1e879d88404fd867f93a0e'
Michael Niedermayer [Wed, 4 Sep 2013 10:20:53 +0000 (12:20 +0200)]
Merge commit 'd719981273bc779c7d1e879d88404fd867f93a0e'

* commit 'd719981273bc779c7d1e879d88404fd867f93a0e':
  4xm: Check that the read track value is non-negative

Conflicts:
libavformat/4xm.c

See: 0838cfdc8a10185604db5cd9d6bffad71279a0e8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '5bcd3ae5b167fb74215520b01d5d810e0c8986ab'
Michael Niedermayer [Wed, 4 Sep 2013 10:06:36 +0000 (12:06 +0200)]
Merge commit '5bcd3ae5b167fb74215520b01d5d810e0c8986ab'

* commit '5bcd3ae5b167fb74215520b01d5d810e0c8986ab':
  matroskadec: Check that .lang was allocated and set before reading it

Conflicts:
libavformat/matroskadec.c

See: 01fd1aa0ad2b95045df35f94ee9de073d24609c8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'f7c5883126f9440547933eefcf000aa78af4821c'
Michael Niedermayer [Wed, 4 Sep 2013 09:50:54 +0000 (11:50 +0200)]
Merge commit 'f7c5883126f9440547933eefcf000aa78af4821c'

* commit 'f7c5883126f9440547933eefcf000aa78af4821c':
  alac: Limit max_samples_per_frame

See: 3920d1387834e2bc334aff9f518f4beb24e470bd
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomem: Document the av_realloc family of functions properly
Luca Barbato [Sun, 1 Sep 2013 17:46:59 +0000 (19:46 +0200)]
mem: Document the av_realloc family of functions properly

realloc() does not accept pointers from memalign().

7 years agobuild: Report an error message when a pc file is not found
Luca Barbato [Tue, 3 Sep 2013 20:15:23 +0000 (22:15 +0200)]
build: Report an error message when a pc file is not found

Ease tracking path problems.

7 years agoMerge remote-tracking branch 'cehoyos/master'
Michael Niedermayer [Tue, 3 Sep 2013 23:51:07 +0000 (01:51 +0200)]
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Show subtitle resolution in avcodec_string().

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/utils: assert position monotonicity in ff_find_last_ts()
Michael Niedermayer [Tue, 3 Sep 2013 22:58:16 +0000 (00:58 +0200)]
avformat/utils: assert position monotonicity in ff_find_last_ts()

This ensures that no read timestamp functions finds packets before the search window in ff_find_last_ts()
which could cause an infinite loop

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoShow subtitle resolution in avcodec_string().
Carl Eugen Hoyos [Tue, 3 Sep 2013 23:04:01 +0000 (01:04 +0200)]
Show subtitle resolution in avcodec_string().

7 years agoavformat/mpegts: Ensure that mpegts_get_dts() only considers packets at or after...
Michael Niedermayer [Tue, 3 Sep 2013 22:55:38 +0000 (00:55 +0200)]
avformat/mpegts: Ensure that mpegts_get_dts() only considers packets at or after the given position

This fixes an infinite loop
An alternative fix would be to revert d73cbc22c5f2c305838d9867538cf4ad59c4035f
but that would worsen error resilience.

Found-by: Justin Ruggles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agofate: Force diff into text mode
Michael Niedermayer [Tue, 3 Sep 2013 21:54:01 +0000 (23:54 +0200)]
fate: Force diff into text mode

On openbsd the exif-image-jpg test fails but diff treats the files as
binary due to some non ascii symbols in them. This should force it to
treat them as text, which should result in more informative output

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/pictordec: remove y checks, which have become redundant
Michael Niedermayer [Tue, 3 Sep 2013 19:49:12 +0000 (21:49 +0200)]
avcodec/pictordec: remove y checks, which have become redundant

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/pictordec: run av_image_check_size() unconditionally
Michael Niedermayer [Tue, 3 Sep 2013 19:45:25 +0000 (21:45 +0200)]
avcodec/pictordec: run av_image_check_size() unconditionally

This ensures that no invalid size leaks through
(This issue is hypothetical, ive no testcase)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavfi/mptestsrc: use outlink->frame_count
Paul B Mahol [Tue, 3 Sep 2013 17:31:05 +0000 (17:31 +0000)]
lavfi/mptestsrc: use outlink->frame_count

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agomjpegb: Detect changing number of planes in interlaced video
Michael Niedermayer [Sat, 10 Mar 2012 21:02:46 +0000 (22:02 +0100)]
mjpegb: Detect changing number of planes in interlaced video

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoalac: Check that the channels fit at the given offset
Martin Storsjö [Tue, 3 Sep 2013 11:16:40 +0000 (14:16 +0300)]
alac: Check that the channels fit at the given offset

The code tries to decode a number of channels at the
offset given by the ff_alac_channel_layout_offsets table.
Even if the number of channels decoded so far doesn't
exceed the total number of channels, we need to check that
we actually can decode that number of channels at this offset
as well.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years ago4xm: Check that the read track value is non-negative
Martin Storsjö [Tue, 3 Sep 2013 10:53:23 +0000 (13:53 +0300)]
4xm: Check that the read track value is non-negative

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agomatroskadec: Check that .lang was allocated and set before reading it
Martin Storsjö [Tue, 3 Sep 2013 09:10:50 +0000 (12:10 +0300)]
matroskadec: Check that .lang was allocated and set before reading it

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoalac: Limit max_samples_per_frame
Martin Storsjö [Tue, 3 Sep 2013 08:54:03 +0000 (11:54 +0300)]
alac: Limit max_samples_per_frame

Otherwise buffer size calculations in allocate_buffers could
overflow later, making the code think a large enough buffer
actually was allocated.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agolavfi/drawtext: add generic timeline interface and deprecate "draw".
Clément Bœsch [Tue, 20 Aug 2013 18:56:39 +0000 (20:56 +0200)]
lavfi/drawtext: add generic timeline interface and deprecate "draw".

7 years agoUpdate copyrights where my email appears with the new one.
Clément Bœsch [Tue, 3 Sep 2013 18:42:24 +0000 (20:42 +0200)]
Update copyrights where my email appears with the new one.

7 years agoavformat/mpl2dec: handle files with CRLF linebreaks correctly
wm4 [Wed, 7 Aug 2013 23:04:36 +0000 (01:04 +0200)]
avformat/mpl2dec: handle files with CRLF linebreaks correctly

Skip the "\r" as normal text. Otherwise it will be the first character
of the string passed to sscanf(), which then fill fail to match the
timestamps.

Signed-off-by: Clément Bœsch <u@pkh.me>
7 years agoavformat: H265 demuxer
Dirk Farin [Mon, 2 Sep 2013 12:33:14 +0000 (14:33 +0200)]
avformat: H265 demuxer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavfi/hue: relicense to LGPL with permission by all contributors
Paul B Mahol [Tue, 3 Sep 2013 17:07:53 +0000 (17:07 +0000)]
lavfi/hue: relicense to LGPL with permission by all contributors

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agox86/simple_idct: use LOCAL_ALIGNED instead of DECLARE_ALIGNED
Paul B Mahol [Mon, 2 Sep 2013 22:02:59 +0000 (22:02 +0000)]
x86/simple_idct: use LOCAL_ALIGNED instead of DECLARE_ALIGNED

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agolavfi/mp: remove mp=phase
Paul B Mahol [Tue, 3 Sep 2013 12:46:28 +0000 (12:46 +0000)]
lavfi/mp: remove mp=phase

The filter was ported to a native libavfilter filter.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agolavfi: port phase filter from libmpcodecs
Paul B Mahol [Sat, 31 Aug 2013 18:46:17 +0000 (18:46 +0000)]
lavfi: port phase filter from libmpcodecs

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavcodec/vcr1: simplify code drop buf variable
Michael Niedermayer [Tue, 3 Sep 2013 13:47:21 +0000 (15:47 +0200)]
avcodec/vcr1: simplify code drop buf variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/vcr1: simplify code, drop buf_size
Michael Niedermayer [Tue, 3 Sep 2013 13:46:56 +0000 (15:46 +0200)]
avcodec/vcr1: simplify code, drop buf_size

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/vcr1: return the actual number of consumed bytes
Michael Niedermayer [Tue, 3 Sep 2013 13:44:37 +0000 (15:44 +0200)]
avcodec/vcr1: return the actual number of consumed bytes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 3 Sep 2013 13:18:43 +0000 (15:18 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  movenc: Don't flush after each written packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '7df9e693a34c84c698da60426c78140c950f95ed'
Michael Niedermayer [Tue, 3 Sep 2013 13:05:00 +0000 (15:05 +0200)]
Merge commit '7df9e693a34c84c698da60426c78140c950f95ed'

* commit '7df9e693a34c84c698da60426c78140c950f95ed':
  cosmetics: Fix ATRAC codec name spelling

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '488b2984fece7ad0c2596826fee18e74aa904667'
Michael Niedermayer [Tue, 3 Sep 2013 12:57:47 +0000 (14:57 +0200)]
Merge commit '488b2984fece7ad0c2596826fee18e74aa904667'

* commit '488b2984fece7ad0c2596826fee18e74aa904667':
  ape demuxer: check for EOF in potentially long loops

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'a7c1689dedd11689edb30088d467ac03f9b8d1cf'
Michael Niedermayer [Tue, 3 Sep 2013 12:50:31 +0000 (14:50 +0200)]
Merge commit 'a7c1689dedd11689edb30088d467ac03f9b8d1cf'

* commit 'a7c1689dedd11689edb30088d467ac03f9b8d1cf':
  4xm: check that bits per sample is strictly positive

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/utils: Fix bitrate overflow check
Michael Niedermayer [Tue, 3 Sep 2013 12:36:12 +0000 (14:36 +0200)]
avformat/utils: Fix bitrate overflow check

The check added in df33a58e5311ee9a64a573889b883a80e981af7b does not work
at all, rather it broke the summing of bitrates completely.
The comparission was wrong way around.
This commit replaces it by a simpler and hopefully clearer check

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'df33a58e5311ee9a64a573889b883a80e981af7b'
Michael Niedermayer [Tue, 3 Sep 2013 12:28:49 +0000 (14:28 +0200)]
Merge commit 'df33a58e5311ee9a64a573889b883a80e981af7b'

* commit 'df33a58e5311ee9a64a573889b883a80e981af7b':
  lavf: avoid integer overflow when estimating bitrate

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'fab694dd3931b1c0bc3c598c3f88b1902c14a303'
Michael Niedermayer [Tue, 3 Sep 2013 12:16:42 +0000 (14:16 +0200)]
Merge commit 'fab694dd3931b1c0bc3c598c3f88b1902c14a303'

* commit 'fab694dd3931b1c0bc3c598c3f88b1902c14a303':
  lavf: move a variable declaration to the block where it's used

Conflicts:
libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoriff: add 0x64 to g726 works on g726-test1.wav
Compn [Tue, 3 Sep 2013 12:25:43 +0000 (08:25 -0400)]
riff: add 0x64 to g726 works on g726-test1.wav

7 years agoMerge commit 'fe9bb61f9a16be19ad91875632c39e44b7a99a8a'
Michael Niedermayer [Tue, 3 Sep 2013 12:14:12 +0000 (14:14 +0200)]
Merge commit 'fe9bb61f9a16be19ad91875632c39e44b7a99a8a'

* commit 'fe9bb61f9a16be19ad91875632c39e44b7a99a8a':
  pictordec: pass correct context to avpriv_request_sample

Conflicts:
libavcodec/pictordec.c

No change as the avpriv_request_sample() has already been replaced by an implementation
of the codepath.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '5f7aecde02a95451e514c809f2794c1deba80695'
Michael Niedermayer [Tue, 3 Sep 2013 12:00:28 +0000 (14:00 +0200)]
Merge commit '5f7aecde02a95451e514c809f2794c1deba80695'

* commit '5f7aecde02a95451e514c809f2794c1deba80695':
  pictordec: break out of both decoding loops when y drops below 0

Conflicts:
libavcodec/pictordec.c

The added check is redundant.
It shows the error path more clearly though

See: f3f488423a12af9bb4eed6e6868cfa86ece3571b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/vcr1: replace redundant checks from libav (8aba7968dd604aae91ee42cbce0be3dad7...
Michael Niedermayer [Tue, 3 Sep 2013 11:36:22 +0000 (13:36 +0200)]
avcodec/vcr1: replace redundant checks from libav (8aba7968dd604aae91ee42cbce0be3dad7dceb30)  by asserts

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit '8aba7968dd604aae91ee42cbce0be3dad7dceb30'
Michael Niedermayer [Tue, 3 Sep 2013 11:17:20 +0000 (13:17 +0200)]
Merge commit '8aba7968dd604aae91ee42cbce0be3dad7dceb30'

* commit '8aba7968dd604aae91ee42cbce0be3dad7dceb30':
  vcr1: add sanity checks

Conflicts:
libavcodec/vcr1.c

See: 845724c82c1a732ab398c9e8cedd178f96f1626d
See: 8e09482e4d27d65bbce2ce5c2f4392216011ed09
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agomovenc: Don't flush after each written packet
Martin Storsjö [Mon, 2 Sep 2013 13:23:17 +0000 (16:23 +0300)]
movenc: Don't flush after each written packet

This should improve write performance quite significantly.
---
Tested with both writing a normal mp4, by using the faststart
feature and writing a fragmented mp4 file; all turn out with the
same md5sum as before.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoavfilter/vf_yadif: reallocate frames if strides differ
Michael Niedermayer [Tue, 3 Sep 2013 02:40:04 +0000 (04:40 +0200)]
avfilter/vf_yadif: reallocate frames if strides differ

Fixes Ticket2896

An alternative to this would be to change the code to support any
stride.
The condition of differing strides should be rare.
If theres no speedloss supporting any stride would be better

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavutil/fifo: assert that theres enough data in the fifo on drain calls.
Michael Niedermayer [Tue, 3 Sep 2013 01:05:41 +0000 (03:05 +0200)]
avutil/fifo: assert that theres enough data in the fifo on drain calls.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agow64dec: fix end position of summarylist guid
Paul B Mahol [Tue, 3 Sep 2013 01:03:10 +0000 (01:03 +0000)]
w64dec: fix end position of summarylist guid

Noticed-by: James Almer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agow64dec: fix skipping of unknown guids
Paul B Mahol [Mon, 2 Sep 2013 22:50:00 +0000 (22:50 +0000)]
w64dec: fix skipping of unknown guids

Regression since 14d50c1.
Fixes #2932.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agoavpacket: Fixing side data copy when src == dst
Vignesh Venkatasubramanian [Mon, 2 Sep 2013 17:42:22 +0000 (10:42 -0700)]
avpacket: Fixing side data copy when src == dst

Fixing av_packet_copy_side_data to work correctly when source and
destination are the same. This makes sure that there is no memory
leak and double frees.

Signed-off by: Vignesh Venkatasubramanian <vigneshv@google.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agocosmetics: Fix ATRAC codec name spelling
Diego Biurrun [Mon, 2 Sep 2013 18:21:49 +0000 (20:21 +0200)]
cosmetics: Fix ATRAC codec name spelling

7 years agoape demuxer: check for EOF in potentially long loops
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
ape demuxer: check for EOF in potentially long loops

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years ago4xm: check that bits per sample is strictly positive
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
4xm: check that bits per sample is strictly positive

Avoids a divide by zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agolavf: avoid integer overflow when estimating bitrate
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
lavf: avoid integer overflow when estimating bitrate

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agolavf: move a variable declaration to the block where it's used
Anton Khirnov [Sun, 25 Aug 2013 09:53:34 +0000 (11:53 +0200)]
lavf: move a variable declaration to the block where it's used

7 years agopictordec: pass correct context to avpriv_request_sample
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
pictordec: pass correct context to avpriv_request_sample

Fixes invalid reads.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agopictordec: break out of both decoding loops when y drops below 0
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
pictordec: break out of both decoding loops when y drops below 0

Otherwise picmemset can get called with negative y, resulting in an
invalid write.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agovcr1: add sanity checks
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
vcr1: add sanity checks

Fixes invalid reads with corrupted files.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoavformat/movenc: Use the rate from av_timecode_init_from_string() for tmcd
Michael Niedermayer [Mon, 2 Sep 2013 14:33:02 +0000 (16:33 +0200)]
avformat/movenc: Use the rate from av_timecode_init_from_string() for tmcd

Fixes Ticket2892
Reveiwed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/pnmdec: fix unaligned read
Michael Niedermayer [Mon, 2 Sep 2013 10:32:32 +0000 (12:32 +0200)]
avcodec/pnmdec: fix unaligned read

Fixes fate-lavf-pam on alpha

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/pnmdec: use a more specific pointer type than void in samplecpy()
Michael Niedermayer [Mon, 2 Sep 2013 10:31:55 +0000 (12:31 +0200)]
avcodec/pnmdec: use a more specific pointer type than void in samplecpy()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoAvoid a deadlock when decoding wma.
Carl Eugen Hoyos [Mon, 2 Sep 2013 06:32:24 +0000 (08:32 +0200)]
Avoid a deadlock when decoding wma.

Fixes ticket #2925.

7 years agoavfilter/vf_fps: make sure the fifo is not empty before using it
Michael Niedermayer [Mon, 2 Sep 2013 02:32:23 +0000 (04:32 +0200)]
avfilter/vf_fps: make sure the fifo is not empty before using it

Fixes Ticket2905

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolavc: add teletext decoder using libzvbi
Marton Balint [Sun, 1 Sep 2013 21:05:50 +0000 (23:05 +0200)]
lavc: add teletext decoder using libzvbi

Based on a patch by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>.
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2012-December/136677.html

The original patch was rebased by Tudor SUCIU <tudor.suciu@gmail.com>.

Lots of additional features and fixes are made by me.

Fixes ticket #2086.

Changes since last version:
- change default page to all pages

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'cehoyos/master'
Michael Niedermayer [Sun, 1 Sep 2013 22:59:30 +0000 (00:59 +0200)]
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Read h264 headers from v4l2 to allow stream-copying.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/ffv1dec: reorganize thread init/update
Michael Niedermayer [Sun, 1 Sep 2013 20:38:43 +0000 (22:38 +0200)]
avcodec/ffv1dec: reorganize thread init/update

This moves some allocations to init, reducing possible failure modes in update.
Always copies from the previous context instead of just during init

Fixes Ticket2923

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/ffv1dec: move initial_states init to init_thread_copy()
Michael Niedermayer [Sun, 1 Sep 2013 17:29:38 +0000 (19:29 +0200)]
avcodec/ffv1dec: move initial_states init to init_thread_copy()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoRead h264 headers from v4l2 to allow stream-copying.
Carl Eugen Hoyos [Sun, 1 Sep 2013 18:20:47 +0000 (20:20 +0200)]
Read h264 headers from v4l2 to allow stream-copying.

Fixes ticket #2882.
Analyzed and tested by William C Bonner.

7 years agopcm-dvd: use av_freep()
Paul B Mahol [Sun, 1 Sep 2013 19:20:39 +0000 (19:20 +0000)]
pcm-dvd: use av_freep()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agopcm-dvd: remove redundant log message
Paul B Mahol [Sun, 1 Sep 2013 19:19:31 +0000 (19:19 +0000)]
pcm-dvd: remove redundant log message

Signed-off-by: Paul B Mahol <onemda@gmail.com>
7 years agodoc: fix insane hard texi2html dependancy
Michael Niedermayer [Sun, 1 Sep 2013 17:56:52 +0000 (19:56 +0200)]
doc: fix insane hard texi2html dependancy

Found-by: nevcairiel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopixfmt: add native bayer 16bit formats
Michael Niedermayer [Sat, 5 Jan 2013 03:58:19 +0000 (04:58 +0100)]
pixfmt: add native bayer 16bit formats

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agolibavutil: add AV_PIX_FMT_BAYER pixel formats
Peter Ross [Sun, 16 Dec 2012 01:48:39 +0000 (12:48 +1100)]
libavutil: add AV_PIX_FMT_BAYER pixel formats

The pixel format descriptors are set to more or less arbitrary
values as bayer formats do not fit in the descriptors structure.
These values are currently not used for bayer formats and thus
do not matter.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 1 Sep 2013 12:09:17 +0000 (14:09 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  pcm-dvd: Fix build on big endian

See: 789cd1de99cd272c02b2d960cfa08f9ecfe981d7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'f4ca970dba13a60a1334cce1b574036e6f624b9c'
Michael Niedermayer [Sun, 1 Sep 2013 11:41:33 +0000 (13:41 +0200)]
Merge commit 'f4ca970dba13a60a1334cce1b574036e6f624b9c'

* commit 'f4ca970dba13a60a1334cce1b574036e6f624b9c':
  configure: Add docdir configuration option

Conflicts:
configure
doc/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'faa8245bd45c1a6dd220ba9407ea1c82132aa1ce'
Michael Niedermayer [Sun, 1 Sep 2013 11:07:40 +0000 (13:07 +0200)]
Merge commit 'faa8245bd45c1a6dd220ba9407ea1c82132aa1ce'

* commit 'faa8245bd45c1a6dd220ba9407ea1c82132aa1ce':
  vf_lut: Constantize

Conflicts:
libavfilter/vf_lut.c

See: d7e95ccd9ff3e55e194582a105421fa308a83ef1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/pcm-dvd: discard buffer if block size changed
Michael Niedermayer [Sun, 1 Sep 2013 10:36:51 +0000 (12:36 +0200)]
avcodec/pcm-dvd: discard buffer if block size changed

This prevents a potential crash

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopcm-dvd: Fix build on big endian
Martin Storsjö [Sat, 31 Aug 2013 15:35:33 +0000 (17:35 +0200)]
pcm-dvd: Fix build on big endian

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoMerge commit 'a42e3a6700547e4e49445bda81d3a89ec3e081a9'
Michael Niedermayer [Sun, 1 Sep 2013 11:00:08 +0000 (13:00 +0200)]
Merge commit 'a42e3a6700547e4e49445bda81d3a89ec3e081a9'

* commit 'a42e3a6700547e4e49445bda81d3a89ec3e081a9':
  pcm_dvd: consolidate pieces from pcm.c and mpeg.c

Conflicts:
libavcodec/pcm.c
libavcodec/version.h
libavformat/mpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
7 years agofate: update fate tests after master:291ad12ea2d1: ffprobe: show probe_score in the...
Michael Niedermayer [Sun, 1 Sep 2013 10:53:24 +0000 (12:53 +0200)]
fate: update fate tests after master:291ad12ea2d1: ffprobe: show probe_score in the format section

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoffprobe: show probe_score in the format section
Stefano Sabatini [Wed, 28 Aug 2013 22:28:26 +0000 (00:28 +0200)]
ffprobe: show probe_score in the format section

Should address trac ticket #2621.

7 years agoffprobe: fix format section XML validation
Stefano Sabatini [Sun, 1 Sep 2013 09:28:56 +0000 (11:28 +0200)]
ffprobe: fix format section XML validation

It was broken since 2186a7e547fdda716138444c8345ce8b823f2d4a.

7 years agoavcodec/h264: set er.ref_count earlier
Michael Niedermayer [Sun, 1 Sep 2013 01:40:20 +0000 (03:40 +0200)]
avcodec/h264: set er.ref_count earlier

Fixes Ticket2910

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/error_resilience: change out commented printf() to av_log()
Michael Niedermayer [Sun, 1 Sep 2013 01:44:19 +0000 (03:44 +0200)]
avcodec/error_resilience: change out commented printf() to av_log()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/utils: fix duration_fields calculation when need_parsing=0
Michael Niedermayer [Sat, 31 Aug 2013 22:46:14 +0000 (00:46 +0200)]
avformat/utils: fix duration_fields calculation when need_parsing=0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavformat/lxfdec: use a parser to parse video frame headers
Michael Niedermayer [Sat, 31 Aug 2013 22:21:37 +0000 (00:21 +0200)]
avformat/lxfdec: use a parser to parse video frame headers

lxf needs a parser (or would need to set a few fields explicitly).
Fixes Ticket2917

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agopcm-dvd: Fix build on big endian
Martin Storsjö [Sat, 31 Aug 2013 15:35:33 +0000 (17:35 +0200)]
pcm-dvd: Fix build on big endian

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoavcodec/utils: avcodec_string: print colorspace type
Michael Niedermayer [Tue, 27 Aug 2013 20:04:38 +0000 (22:04 +0200)]
avcodec/utils: avcodec_string: print colorspace type

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
7 years agoavcodec/utils: avcodec_string: Print color_range
Michael Niedermayer [Tue, 27 Aug 2013 20:04:00 +0000 (22:04 +0200)]
avcodec/utils: avcodec_string: Print color_range

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