OSDN Git Service

android-x86/external-ffmpeg.git
10 years agoffmpeg: add support to force specific AVCodecs
Michael Niedermayer [Sat, 28 Sep 2013 15:52:45 +0000 (17:52 +0200)]
ffmpeg: add support to force specific AVCodecs

previously only codec_ids could be forced, which did not allow
forcing a specific implementation like libopenjpeg vs jpeg2000.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoavformat: add support to force specific AVCodecs
Michael Niedermayer [Sat, 28 Sep 2013 15:52:45 +0000 (17:52 +0200)]
avformat: add support to force specific AVCodecs

previously only codec_ids could be forced, which did not allow
forcing a specific implementation like libopenjpeg vs jpeg2000.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoavformat/utils: pass AVFormatContext to find_decoder()
Michael Niedermayer [Sat, 28 Sep 2013 15:31:46 +0000 (17:31 +0200)]
avformat/utils: pass AVFormatContext to find_decoder()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoVC1 VDPAU: Mark missing reference frames as such.
Reimar Döffinger [Sat, 28 Sep 2013 09:13:35 +0000 (11:13 +0200)]
VC1 VDPAU: Mark missing reference frames as such.

Currently the code passes some nonsense values as
references instead, causing corruption with NVidia's
and assertion failures with Mesa's implementation.
For non-corrupted input this mostly happens in
interlaced bitstreams, e.g.
http://samples.mplayerhq.hu/V-codecs/WMV9/interlaced/480i30__codec_WVC1__mode_2__framerate_29.970__type_2__preproc_17.wmv.
The != VDP_INVALID handle assert does not trigger
(and probably is quite nonsense) because the frames
are initialized to 0.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years agomov: fix trun / pseudo_stream_id handling
Michael Niedermayer [Wed, 2 Oct 2013 16:45:59 +0000 (18:45 +0200)]
mov: fix trun / pseudo_stream_id handling

This fixes simple concatenated h264

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoavcodec/imgconvert/get_color_type: fix type for PAL8
Michael Niedermayer [Wed, 2 Oct 2013 16:11:28 +0000 (18:11 +0200)]
avcodec/imgconvert/get_color_type: fix type for PAL8

Fixes Ticket3008

Fate changes as PAL8 gets used instead of BGR8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoavcodec: use designated initializers for bitstream filters
Paul B Mahol [Wed, 2 Oct 2013 17:20:29 +0000 (17:20 +0000)]
avcodec: use designated initializers for bitstream filters

Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Wed, 2 Oct 2013 12:59:38 +0000 (14:59 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  rtmp: alias rtmp_listen to listen

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit 'ad0560fe7491a85c3e71d5a3d6a0443f10b33ab1'
Michael Niedermayer [Wed, 2 Oct 2013 12:55:18 +0000 (14:55 +0200)]
Merge commit 'ad0560fe7491a85c3e71d5a3d6a0443f10b33ab1'

* commit 'ad0560fe7491a85c3e71d5a3d6a0443f10b33ab1':
  mxf: Remove a typo

Conflicts:
libavformat/mxfdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit 'cc41167aede4c101ad17eeffa8f39bb6c23d3dad'
Michael Niedermayer [Wed, 2 Oct 2013 12:47:17 +0000 (14:47 +0200)]
Merge commit 'cc41167aede4c101ad17eeffa8f39bb6c23d3dad'

* commit 'cc41167aede4c101ad17eeffa8f39bb6c23d3dad':
  asfdec: Check the return value of asf_read_stream_properties

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoavfilter/avf_showspectrum: use the name 's' for the pointer to the private context
Clément Bœsch [Thu, 16 May 2013 16:28:25 +0000 (18:28 +0200)]
avfilter/avf_showspectrum: use the name 's' for the pointer to the private context

10 years agoavfilter/af_afade: use the name 's' for the pointer to the private context
Paul B Mahol [Wed, 2 Oct 2013 11:09:06 +0000 (11:09 +0000)]
avfilter/af_afade: use the name 's' for the pointer to the private context

Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years agoffmpeg: dont return reserved values
Michael Niedermayer [Tue, 1 Oct 2013 16:28:11 +0000 (18:28 +0200)]
ffmpeg: dont return reserved values

Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoavfilter/vf_removelogo: use the name 's' for the pointer to the private context
Clément Bœsch [Thu, 16 May 2013 15:53:39 +0000 (17:53 +0200)]
avfilter/vf_removelogo: use the name 's' for the pointer to the private context

10 years agoavfilter/af_silencedetect: use the name 's' for the pointer to the private context
Paul B Mahol [Wed, 2 Oct 2013 10:28:04 +0000 (10:28 +0000)]
avfilter/af_silencedetect: use the name 's' for the pointer to the private context

Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years agoatrac3: Generalize gain compensation code
Maxim Poliakovski [Wed, 2 Oct 2013 00:23:16 +0000 (02:23 +0200)]
atrac3: Generalize gain compensation code

Move it to the ATRAC common code, so it can be reused
in the umpcoming ATRAC3+ decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoatrac3/decode_gain_control: cosmetics
Maxim Poliakovski [Wed, 2 Oct 2013 00:23:16 +0000 (02:23 +0200)]
atrac3/decode_gain_control: cosmetics

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoatrac3: rename num_gain_data to num_points
Maxim Poliakovski [Wed, 2 Oct 2013 00:23:16 +0000 (02:23 +0200)]
atrac3: rename num_gain_data to num_points

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoatrac3: Rename GainInfo to AtracGainInfo
Maxim Poliakovski [Wed, 2 Oct 2013 00:23:16 +0000 (02:23 +0200)]
atrac3: Rename GainInfo to AtracGainInfo

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoatrac: limit line length to 80 chars
Maxim Poliakovski [Tue, 1 Oct 2013 23:55:13 +0000 (01:55 +0200)]
atrac: limit line length to 80 chars

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoatrac: Move doxygen comments to the header
Maxim Poliakovski [Tue, 1 Oct 2013 23:55:13 +0000 (01:55 +0200)]
atrac: Move doxygen comments to the header

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoatrac: Update copyright info and file description.
Maxim Poliakovski [Tue, 1 Oct 2013 23:55:13 +0000 (01:55 +0200)]
atrac: Update copyright info and file description.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoatrac: Add missing av_cold.
Maxim Poliakovski [Tue, 1 Oct 2013 23:55:13 +0000 (01:55 +0200)]
atrac: Add missing av_cold.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoavcodec/wmalosslessdec: check block_align
Michael Niedermayer [Tue, 1 Oct 2013 23:16:11 +0000 (01:16 +0200)]
avcodec/wmalosslessdec: check block_align

Code copied from wmaprodec

Fixes null pointer dereference
Fixes Ticket3002

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoRevert "Merge commit '61c31e4ee7ea79a9e74c0476b81244febf17e6d7'" (configure: Properly...
Michael Niedermayer [Tue, 1 Oct 2013 21:40:19 +0000 (23:40 +0200)]
Revert "Merge commit '61c31e4ee7ea79a9e74c0476b81244febf17e6d7'" (configure: Properly set zlib dependencies for all components)

The reverted commit introduced undefined behavior.
undefined in the sense that the evaluation order of the dependencies affects the results

Fixes Ticket2920

This reverts commit c32db6adab9942781cc5a23f62abb839a5595a83, reversing
changes made to 05f1b4e2ecc4683467669a190e3a53df413de805.

Alternative solutions would be to change the dependency solver to handle non trivial
dependencies or to enable zlib by default before the dependency solver, this would
leave a zlib dependency in the libs though then even when no zlib is needed or used.

10 years agoavfilter/vf_histogram: change order of histograms for planar rgb
Paul B Mahol [Tue, 1 Oct 2013 21:22:22 +0000 (21:22 +0000)]
avfilter/vf_histogram: change order of histograms for planar rgb

Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years agoavfilter/vf_histogram: add support for subsampled planar yuv modes in waveform mode
Marton Balint [Tue, 1 Oct 2013 20:39:03 +0000 (20:39 +0000)]
avfilter/vf_histogram: add support for subsampled planar yuv modes in waveform mode

Signed-off-by: Marton Balint <cus@passwd.hu>
10 years agoavfilter/vf_histogram: improve waveform speed
Marton Balint [Tue, 1 Oct 2013 19:53:57 +0000 (21:53 +0200)]
avfilter/vf_histogram: improve waveform speed

Signed-off-by: Marton Balint <cus@passwd.hu>
10 years agoavcodec/fraps: increase vlc nb_bits
Michael Niedermayer [Sat, 28 Sep 2013 18:45:51 +0000 (20:45 +0200)]
avcodec/fraps: increase vlc nb_bits

This should fix decoding the file in:
http://ffmpeg.gusari.org/viewtopic.php?f=16&t=1078
No i dont have the file so i cant test

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoconfigure: fix logic for threads in case of OpenCL is enabled. Fixes ticket 3004.
Thilo Borgmann [Tue, 1 Oct 2013 14:49:39 +0000 (16:49 +0200)]
configure: fix logic for threads in case of OpenCL is enabled. Fixes ticket 3004.

Signed-off-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agortmp: alias rtmp_listen to listen
Luca Barbato [Tue, 1 Oct 2013 13:42:06 +0000 (15:42 +0200)]
rtmp: alias rtmp_listen to listen

Make it uniform with the other protocols.

10 years agomxf: Remove a typo
Luca Barbato [Tue, 1 Oct 2013 11:43:48 +0000 (13:43 +0200)]
mxf: Remove a typo

Introduced in 93370d1216

10 years agoswscale/utils: dont divide by zero with zero vectors
Michael Niedermayer [Mon, 30 Sep 2013 22:27:28 +0000 (00:27 +0200)]
swscale/utils: dont divide by zero with zero vectors

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoswscale: make bilinear scaling the default
wm4 [Sun, 29 Sep 2013 17:52:37 +0000 (19:52 +0200)]
swscale: make bilinear scaling the default

Before this commit, sws_init_context() failed with an error if no scaler
was explicitly set.

Defaulting to something reasonable is better behavior.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agofate: add fieldorder test
Paul B Mahol [Mon, 30 Sep 2013 14:06:02 +0000 (14:06 +0000)]
fate: add fieldorder test

Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years agodoc: move sws_dither option description to scaler.texi
Stefano Sabatini [Mon, 30 Sep 2013 14:54:46 +0000 (16:54 +0200)]
doc: move sws_dither option description to scaler.texi

That's the more proper place where the scaler options should be
documented.

10 years agodoc/filters/scale: mention and link scaler options
Stefano Sabatini [Mon, 30 Sep 2013 14:50:44 +0000 (16:50 +0200)]
doc/filters/scale: mention and link scaler options

10 years agodoc/filters/scale: fix MAN rendering of @ref arguments
Stefano Sabatini [Mon, 30 Sep 2013 14:43:33 +0000 (16:43 +0200)]
doc/filters/scale: fix MAN rendering of @ref arguments

10 years agodoc: try to add a link from the vf_scale sws_flags to the scaler docs
Michael Niedermayer [Mon, 30 Sep 2013 14:03:44 +0000 (16:03 +0200)]
doc: try to add a link from the vf_scale sws_flags to the scaler docs

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoavfilter/vf_hflip: support slice threading
Paul B Mahol [Mon, 30 Sep 2013 09:26:11 +0000 (09:26 +0000)]
avfilter/vf_hflip: support slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years agoavfilter/vf_hflip: refactor plane dimensions calculation
Paul B Mahol [Mon, 30 Sep 2013 09:15:15 +0000 (09:15 +0000)]
avfilter/vf_hflip: refactor plane dimensions calculation

Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years agoavfilter/vf_rotate: support slice threading
Paul B Mahol [Sun, 29 Sep 2013 19:04:01 +0000 (19:04 +0000)]
avfilter/vf_rotate: support slice threading

Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years agoskip_bits: dont call UPDATE_CACHE
Michael Niedermayer [Mon, 30 Sep 2013 12:02:53 +0000 (14:02 +0200)]
skip_bits: dont call UPDATE_CACHE

UPDATE_CACHE isnt needed and can cause segfaults

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agocmdutils: print command support in -filters.
Paul B Mahol [Mon, 30 Sep 2013 10:15:22 +0000 (10:15 +0000)]
cmdutils: print command support in -filters.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years agoconfigure: fix build with enable-xmm-clobber-test
Michael Niedermayer [Mon, 30 Sep 2013 09:42:52 +0000 (11:42 +0200)]
configure: fix build with enable-xmm-clobber-test

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agodoc/t2h.init: remove resource-type and distribution meta elements
Timothy Gu [Tue, 24 Sep 2013 03:40:46 +0000 (20:40 -0700)]
doc/t2h.init: remove resource-type and distribution meta elements

The W3C validator complains about these.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
10 years agoMerge remote-tracking branch 'cehoyos/master'
Michael Niedermayer [Mon, 30 Sep 2013 09:09:21 +0000 (11:09 +0200)]
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Avoid img_segment_size == 0 in mtv demuxer.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoavfilter/dualinput: simplify
Paul B Mahol [Sat, 28 Sep 2013 16:06:08 +0000 (16:06 +0000)]
avfilter/dualinput: simplify

Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years agoasfdec: Check the return value of asf_read_stream_properties
Martin Storsjö [Sat, 28 Sep 2013 20:32:57 +0000 (23:32 +0300)]
asfdec: Check the return value of asf_read_stream_properties

This makes sure errors in setting stream parameters are passed
on to the caller. This avoids successfully opening files while
some parameters aren't filled in properly.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoAvoid img_segment_size == 0 in mtv demuxer.
Carl Eugen Hoyos [Sun, 29 Sep 2013 18:09:56 +0000 (20:09 +0200)]
Avoid img_segment_size == 0 in mtv demuxer.

Fixes ticket #3011.

10 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Mon, 30 Sep 2013 00:20:49 +0000 (02:20 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  omadec: fix bitrate for ATRAC3+ streams

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit '23d0fdcf6f30843fc3f14084d80581f1ca10f1f3'
Michael Niedermayer [Mon, 30 Sep 2013 00:15:36 +0000 (02:15 +0200)]
Merge commit '23d0fdcf6f30843fc3f14084d80581f1ca10f1f3'

* commit '23d0fdcf6f30843fc3f14084d80581f1ca10f1f3':
  Add support for multichannel ATRAC3+ streams.

Conflicts:
libavformat/oma.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit '93370d12164236d59645314871a1d6808b2a8ddb'
Michael Niedermayer [Mon, 30 Sep 2013 00:03:33 +0000 (02:03 +0200)]
Merge commit '93370d12164236d59645314871a1d6808b2a8ddb'

* commit '93370d12164236d59645314871a1d6808b2a8ddb':
  mxfdec: set audio timebase to 1/samplerate

Conflicts:
libavformat/mxfdec.c
tests/ref/fate/mxf-demux
tests/ref/seek/lavf-mxf
tests/ref/seek/lavf-mxf_d10

See: 83cab07a4c7f8ee1521c49e387b7d86de78d1955
Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit 'ff07ec143ebd3833fd5a3f4b6c00474ac523a31f'
Michael Niedermayer [Sun, 29 Sep 2013 23:54:59 +0000 (01:54 +0200)]
Merge commit 'ff07ec143ebd3833fd5a3f4b6c00474ac523a31f'

* commit 'ff07ec143ebd3833fd5a3f4b6c00474ac523a31f':
  pcx: Return an error on broken palette if err_detect is set to 'explode'

Conflicts:
libavcodec/pcx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit 'd1d99e3befea5d411ac3aae72dbdecce94f8b547'
Michael Niedermayer [Sun, 29 Sep 2013 23:46:54 +0000 (01:46 +0200)]
Merge commit 'd1d99e3befea5d411ac3aae72dbdecce94f8b547'

* commit 'd1d99e3befea5d411ac3aae72dbdecce94f8b547':
  pcx: Check the packet size before assuming it fits a palette

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit '7ba0cedbfeff5671b264d1d7e90777057b5714c6'
Michael Niedermayer [Sun, 29 Sep 2013 23:41:51 +0000 (01:41 +0200)]
Merge commit '7ba0cedbfeff5671b264d1d7e90777057b5714c6'

* commit '7ba0cedbfeff5671b264d1d7e90777057b5714c6':
  rpza: Fix a buffer size check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit 'aa0dd52434768da64f1f3d8ae92bcf980c1adffc'
Michael Niedermayer [Sun, 29 Sep 2013 23:27:24 +0000 (01:27 +0200)]
Merge commit 'aa0dd52434768da64f1f3d8ae92bcf980c1adffc'

* commit 'aa0dd52434768da64f1f3d8ae92bcf980c1adffc':
  xxan: Disallow odd width

See: 77693c541a541661357a0edd5bbaae69c64b2039
See: 8ad9b48c9b5b749df8fbcd59d61278caadc478ca
Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit 'fc739b3eefa0b58d64e7661621da94a94dbc8a82'
Michael Niedermayer [Sun, 29 Sep 2013 23:21:30 +0000 (01:21 +0200)]
Merge commit 'fc739b3eefa0b58d64e7661621da94a94dbc8a82'

* commit 'fc739b3eefa0b58d64e7661621da94a94dbc8a82':
  xan: Only read within the data that actually was initialized

Conflicts:
libavcodec/xan.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit '30db94dc399f6e4ef8905049d9b740556f0fce47'
Michael Niedermayer [Sun, 29 Sep 2013 23:09:38 +0000 (01:09 +0200)]
Merge commit '30db94dc399f6e4ef8905049d9b740556f0fce47'

* commit '30db94dc399f6e4ef8905049d9b740556f0fce47':
  xan: Use bytestream2 to limit reading to within the buffer

Conflicts:
libavcodec/xan.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit '9fb0de86b49e9fb0709a8ad1e1875e35da841887'
Michael Niedermayer [Sun, 29 Sep 2013 22:56:24 +0000 (00:56 +0200)]
Merge commit '9fb0de86b49e9fb0709a8ad1e1875e35da841887'

* commit '9fb0de86b49e9fb0709a8ad1e1875e35da841887':
  pcx: Consume the whole packet if giving up due to missing palette

Conflicts:
libavcodec/pcx.c

See: b4e516e30e7004a0454a9009080c4de38987189a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit 'a81cad8f86d1feb7e4bfae29e43f3e994935a5c7'
Michael Niedermayer [Sun, 29 Sep 2013 22:40:17 +0000 (00:40 +0200)]
Merge commit 'a81cad8f86d1feb7e4bfae29e43f3e994935a5c7'

* commit 'a81cad8f86d1feb7e4bfae29e43f3e994935a5c7':
  pngdec: Stop trying to decode once inflate returns Z_STREAM_END

Conflicts:
libavcodec/pngdec.c

See: 65bf9a44d7b0295e03463fd143499ab5b85d0cb7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit 'c231987662194d009dd91bfc57c678e0e70ca161'
Michael Niedermayer [Sun, 29 Sep 2013 22:32:01 +0000 (00:32 +0200)]
Merge commit 'c231987662194d009dd91bfc57c678e0e70ca161'

* commit 'c231987662194d009dd91bfc57c678e0e70ca161':
  mov: Make sure the read sample count is nonnegative

Conflicts:
libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit '640a2427aafa774b83316b7a8c5c2bdc28bfd269'
Michael Niedermayer [Sun, 29 Sep 2013 22:13:03 +0000 (00:13 +0200)]
Merge commit '640a2427aafa774b83316b7a8c5c2bdc28bfd269'

* commit '640a2427aafa774b83316b7a8c5c2bdc28bfd269':
  bfi: Add some very basic sanity checks for input packet sizes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit '9fc7184d1a9af8d97b3fc5c2ef9d0a647d6617ea'
Michael Niedermayer [Sun, 29 Sep 2013 21:59:16 +0000 (23:59 +0200)]
Merge commit '9fc7184d1a9af8d97b3fc5c2ef9d0a647d6617ea'

* commit '9fc7184d1a9af8d97b3fc5c2ef9d0a647d6617ea':
  bfi: Avoid divisions by zero

See: 99a8552dae54fd464f19a00d9e5b92596c5c058a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit 'a9221e39600a31ee13e736e9e47743cde23f0280'
Michael Niedermayer [Sun, 29 Sep 2013 21:45:56 +0000 (23:45 +0200)]
Merge commit 'a9221e39600a31ee13e736e9e47743cde23f0280'

* commit 'a9221e39600a31ee13e736e9e47743cde23f0280':
  electronicarts: Add more sanity checking for the number of channels

Note: This check is probably unnecessary
Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit 'd07aa3f02b73ab1371c13ac7898338380ca0932b'
Michael Niedermayer [Sun, 29 Sep 2013 21:41:13 +0000 (23:41 +0200)]
Merge commit 'd07aa3f02b73ab1371c13ac7898338380ca0932b'

* commit 'd07aa3f02b73ab1371c13ac7898338380ca0932b':
  riffdec: Add sanity checks for the sample rate

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoswr: fix example code and doxy indent.
Clément Bœsch [Sun, 29 Sep 2013 21:37:46 +0000 (23:37 +0200)]
swr: fix example code and doxy indent.

10 years agodoc/faq: add @command{} in the tool debug entry.
Clément Bœsch [Tue, 24 Sep 2013 19:43:19 +0000 (21:43 +0200)]
doc/faq: add @command{} in the tool debug entry.

10 years agodoc/faq: remove indent in examples.
Clément Bœsch [Tue, 24 Sep 2013 19:42:21 +0000 (21:42 +0200)]
doc/faq: remove indent in examples.

CSS should take care of this.

10 years agodoc/faq: remove Delphi/Pascal entry.
Clément Bœsch [Tue, 24 Sep 2013 19:41:49 +0000 (21:41 +0200)]
doc/faq: remove Delphi/Pascal entry.

Link is dead.

10 years agodoc/faq: rework r_frame_rate entry.
Clément Bœsch [Tue, 24 Sep 2013 19:41:21 +0000 (21:41 +0200)]
doc/faq: rework r_frame_rate entry.

10 years agoMerge commit '28ff439efd2362fb21e1a78610737f2e26a72d8f'
Michael Niedermayer [Sun, 29 Sep 2013 21:24:27 +0000 (23:24 +0200)]
Merge commit '28ff439efd2362fb21e1a78610737f2e26a72d8f'

* commit '28ff439efd2362fb21e1a78610737f2e26a72d8f':
  mvi: Add sanity checking for the audio frame size

Conflicts:
libavformat/mvi.c

See: ea1d8465e6eca582c09e2526f677033b62576fda
Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit '59480abce7e4238e22b3a4a904a9fe6abf4e4188'
Michael Niedermayer [Sun, 29 Sep 2013 21:03:58 +0000 (23:03 +0200)]
Merge commit '59480abce7e4238e22b3a4a904a9fe6abf4e4188'

* commit '59480abce7e4238e22b3a4a904a9fe6abf4e4188':
  alac: Do bounds checking of lpc_order read from the bitstream

See: fd4f4923cce6a2cbf4f48640b4ac706e614a1594
Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit 'adc09136a4a63b152630abeacb22c56541eacf60'
Michael Niedermayer [Sun, 29 Sep 2013 20:59:11 +0000 (22:59 +0200)]
Merge commit 'adc09136a4a63b152630abeacb22c56541eacf60'

* commit 'adc09136a4a63b152630abeacb22c56541eacf60':
  xwma: Avoid division by zero

Conflicts:
libavformat/xwma.c

See: a3cb7f992f88fcfa524bd9cd08b28e09d6718f75
Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a'
Michael Niedermayer [Sun, 29 Sep 2013 20:51:02 +0000 (22:51 +0200)]
Merge commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a'

* commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a':
  avidec: Make sure a packet is large enough before reading its data

Conflicts:
libavformat/avidec.c

See: 028cc42a1638e6f93a857f11c2568d1c3a51e612
Note: data!=NULL implies that the allocated array is at least FF_INPUT_BUFFER_PADDING_SIZE large
Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit '68ff9981283a56c731f00c2ee7901103665092fc'
Michael Niedermayer [Sun, 29 Sep 2013 20:42:26 +0000 (22:42 +0200)]
Merge commit '68ff9981283a56c731f00c2ee7901103665092fc'

* commit '68ff9981283a56c731f00c2ee7901103665092fc':
  vqf: Make sure the bitrate is in the valid range

Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoMerge commit '9277050e2918e0a0df9689721a188a604d886616'
Michael Niedermayer [Sun, 29 Sep 2013 20:27:01 +0000 (22:27 +0200)]
Merge commit '9277050e2918e0a0df9689721a188a604d886616'

* commit '9277050e2918e0a0df9689721a188a604d886616':
  vqf: Make sure sample_rate is set to a valid value

See: e481ba2ed79421d82ed631d187c05c03260c6561
Merged-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoomadec: fix bitrate for ATRAC3+ streams
Maxim Poliakovski [Sun, 29 Sep 2013 19:53:49 +0000 (21:53 +0200)]
omadec: fix bitrate for ATRAC3+ streams

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agoAdd support for multichannel ATRAC3+ streams.
Maxim Poliakovski [Fri, 27 Sep 2013 22:18:18 +0000 (00:18 +0200)]
Add support for multichannel ATRAC3+ streams.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agomxfdec: set audio timebase to 1/samplerate
Anton Khirnov [Sat, 28 Sep 2013 14:56:54 +0000 (16:56 +0200)]
mxfdec: set audio timebase to 1/samplerate

Fixes sync in some samples (e.g. bugs 7581 and 8374 in VLC).
Based on a commit by Matthieu Bouron <matthieu.bouron@gmail.com>

Reported-by: Jean-Baptiste Kempf <jb@videolan.org>
CC: libav-stable@libav.org
10 years agoavcodec/tiff_common: fix bprint max sizes
Michael Niedermayer [Sun, 29 Sep 2013 19:11:47 +0000 (21:11 +0200)]
avcodec/tiff_common: fix bprint max sizes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years agoavfilter/vf_rotate: use vsub for output plane height calculation
Paul B Mahol [Sun, 29 Sep 2013 19:07:15 +0000 (19:07 +0000)]
avfilter/vf_rotate: use vsub for output plane height calculation

Output plane height used horizontal instead of vertical subsampling.
This is just cosmetic change as filter does not support formats where
vertical subsampling does not match horizontal one.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years agopcx: Return an error on broken palette if err_detect is set to 'explode'
Martin Storsjö [Sun, 29 Sep 2013 15:39:52 +0000 (18:39 +0300)]
pcx: Return an error on broken palette if err_detect is set to 'explode'

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agopcx: Check the packet size before assuming it fits a palette
Martin Storsjö [Sun, 29 Sep 2013 10:02:27 +0000 (13:02 +0300)]
pcx: Check the packet size before assuming it fits a palette

This fixes reads out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agorpza: Fix a buffer size check
Martin Storsjö [Sat, 28 Sep 2013 22:24:20 +0000 (01:24 +0300)]
rpza: Fix a buffer size check

We read 2 bytes for 15 out of 16 pixels, therefore we need to
have at least 30 bytes, not 16.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoxxan: Disallow odd width
Martin Storsjö [Sat, 28 Sep 2013 22:04:05 +0000 (01:04 +0300)]
xxan: Disallow odd width

Decoded data is always written in pairs within this decoder.
This fixes writes out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoxan: Only read within the data that actually was initialized
Martin Storsjö [Sat, 28 Sep 2013 21:59:50 +0000 (00:59 +0300)]
xan: Only read within the data that actually was initialized

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoxan: Use bytestream2 to limit reading to within the buffer
Martin Storsjö [Sat, 28 Sep 2013 21:53:58 +0000 (00:53 +0300)]
xan: Use bytestream2 to limit reading to within the buffer

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agopcx: Consume the whole packet if giving up due to missing palette
Martin Storsjö [Sat, 28 Sep 2013 21:38:50 +0000 (00:38 +0300)]
pcx: Consume the whole packet if giving up due to missing palette

Previously, we returned 0, meaning successful decoding but 0
bytes consumed, leading to an infinite loop.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agopngdec: Stop trying to decode once inflate returns Z_STREAM_END
Martin Storsjö [Sat, 28 Sep 2013 21:12:04 +0000 (00:12 +0300)]
pngdec: Stop trying to decode once inflate returns Z_STREAM_END

If the input buffer contains more data after the deflate stream,
the loop previously left running infinitely, with inflate returning
Z_STREAM_END.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomov: Make sure the read sample count is nonnegative
Martin Storsjö [Sat, 28 Sep 2013 20:57:36 +0000 (23:57 +0300)]
mov: Make sure the read sample count is nonnegative

This avoids setting a negative number of frames, ending up with a
negative average frame rate.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agobfi: Add some very basic sanity checks for input packet sizes
Martin Storsjö [Sat, 28 Sep 2013 20:46:04 +0000 (23:46 +0300)]
bfi: Add some very basic sanity checks for input packet sizes

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agobfi: Avoid divisions by zero
Martin Storsjö [Sat, 28 Sep 2013 20:42:40 +0000 (23:42 +0300)]
bfi: Avoid divisions by zero

If a zero-length video packet is to be returned, just return
AVERROR(EAGAIN) and switch back to the audio stream.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoelectronicarts: Add more sanity checking for the number of channels
Martin Storsjö [Sat, 28 Sep 2013 20:38:40 +0000 (23:38 +0300)]
electronicarts: Add more sanity checking for the number of channels

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoriffdec: Add sanity checks for the sample rate
Martin Storsjö [Sat, 28 Sep 2013 20:32:39 +0000 (23:32 +0300)]
riffdec: Add sanity checks for the sample rate

This avoids a division by zero for G726.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomvi: Add sanity checking for the audio frame size
Martin Storsjö [Sat, 28 Sep 2013 20:26:18 +0000 (23:26 +0300)]
mvi: Add sanity checking for the audio frame size

This avoids a division by zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoalac: Do bounds checking of lpc_order read from the bitstream
Martin Storsjö [Fri, 27 Sep 2013 21:22:52 +0000 (00:22 +0300)]
alac: Do bounds checking of lpc_order read from the bitstream

In lpc_prediction(), we write up to array element 'lpc_order' in
an array allocated to hold 'max_samples_per_frame' elements.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoxwma: Avoid division by zero
Martin Storsjö [Sat, 28 Sep 2013 20:13:26 +0000 (23:13 +0300)]
xwma: Avoid division by zero

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoavidec: Make sure a packet is large enough before reading its data
Martin Storsjö [Fri, 27 Sep 2013 21:41:31 +0000 (00:41 +0300)]
avidec: Make sure a packet is large enough before reading its data

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agodoc/demuxers: fix image2 examples
Paul B Mahol [Sun, 29 Sep 2013 16:36:25 +0000 (16:36 +0000)]
doc/demuxers: fix image2 examples

Signed-off-by: Paul B Mahol <onemda@gmail.com>