ffmpeg.git
8 years agoomadec: make sample rate table large enough to prevent out of array reading.
Michael Niedermayer [Mon, 16 Apr 2012 16:13:51 +0000 (18:13 +0200)]
omadec: make sample rate table large enough to prevent out of array reading.

The new values lead to error messages when used

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agog729dec: initialize pitch_delay_int_prev to the minimum valid value.
Michael Niedermayer [Mon, 16 Apr 2012 16:07:19 +0000 (18:07 +0200)]
g729dec: initialize pitch_delay_int_prev to the minimum valid value.

This prevents an out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoloco: fix 10l typo (missing case)
Michael Niedermayer [Mon, 16 Apr 2012 14:46:53 +0000 (16:46 +0200)]
loco: fix 10l typo (missing case)

Found-by: Clément Bœsch <ubitux@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agodsicinav: Check for overread in RLE decode.
Michael Niedermayer [Mon, 16 Apr 2012 14:44:12 +0000 (16:44 +0200)]
dsicinav: Check for overread in RLE decode.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agosmacker: Check get_vlc() return values.
Michael Niedermayer [Mon, 16 Apr 2012 14:39:02 +0000 (16:39 +0200)]
smacker: Check get_vlc() return values.

Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agodcadec: fix global array overread.
Michael Niedermayer [Mon, 16 Apr 2012 14:27:08 +0000 (16:27 +0200)]
dcadec: fix global array overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoSupport decoding LOCO_CRGBA.
Carl Eugen Hoyos [Mon, 16 Apr 2012 14:19:41 +0000 (16:19 +0200)]
Support decoding LOCO_CRGBA.

Fixes a part of ticket #1222.

8 years agoindeo4: avoid storing invalid values in quant_mat.
Michael Niedermayer [Mon, 16 Apr 2012 12:38:40 +0000 (14:38 +0200)]
indeo4: avoid storing invalid values in quant_mat.

Fixes a global array overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years ago4xmdemux: Check chunk size
Michael Niedermayer [Mon, 16 Apr 2012 12:30:33 +0000 (14:30 +0200)]
4xmdemux: Check chunk size

Fixes over reading the header array

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoomadec: check GEOB sizes against buffer size
Michael Niedermayer [Mon, 16 Apr 2012 11:51:40 +0000 (13:51 +0200)]
omadec: check GEOB sizes against buffer size

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovc1dec: add missing terminating element to mpeg4_video_profiles
Michael Niedermayer [Mon, 16 Apr 2012 11:40:55 +0000 (13:40 +0200)]
vc1dec: add missing terminating element to mpeg4_video_profiles

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovc1dec: check end_mb_y / start_mb_y validity
Michael Niedermayer [Mon, 16 Apr 2012 11:35:41 +0000 (13:35 +0200)]
vc1dec: check end_mb_y / start_mb_y validity

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoflvdec: allocate large enough buffer so get_bits() doesnt overread
Michael Niedermayer [Mon, 16 Apr 2012 10:01:55 +0000 (12:01 +0200)]
flvdec: allocate large enough buffer so get_bits() doesnt overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffv1: attempt to workaround intel CC fate issue.
Michael Niedermayer [Mon, 16 Apr 2012 09:51:17 +0000 (11:51 +0200)]
ffv1: attempt to workaround intel CC fate issue.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoadxdec: Check available space before decoding block.
Michael Niedermayer [Sun, 15 Apr 2012 23:57:36 +0000 (01:57 +0200)]
adxdec: Check available space before decoding block.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agosegafilm: make the loop condition in film_read_packet() match the contents.
Michael Niedermayer [Sun, 15 Apr 2012 23:24:04 +0000 (01:24 +0200)]
segafilm: make the loop condition in film_read_packet() match the contents.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agolavfi/aresample: properly propagate pts == AV_NOPTS_VALUE;
Robert Nagy [Sun, 15 Apr 2012 23:08:00 +0000 (01:08 +0200)]
lavfi/aresample: properly propagate pts == AV_NOPTS_VALUE;

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
8 years agoyadif: fixed missing error handling for poll_frame.
Robert Nagy [Sun, 15 Apr 2012 13:46:37 +0000 (15:46 +0200)]
yadif: fixed missing error handling for poll_frame.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agosws: remove cliping in yuv2rgb code.
Michael Niedermayer [Sun, 15 Apr 2012 21:38:42 +0000 (23:38 +0200)]
sws: remove cliping in yuv2rgb code.

This code should not be needed and it slows things down.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomov: reset dref_count on realloc to keep values consistent.
Michael Niedermayer [Sun, 15 Apr 2012 21:37:09 +0000 (23:37 +0200)]
mov: reset dref_count on realloc to keep values consistent.

This fixes a potential crash.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 15 Apr 2012 20:27:20 +0000 (22:27 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  doc: Improve suggested Emacs settings for our coding style.
  utvideo: Remove unused variable 'src_size'
  mov: free memory on header parsing failure
  mov: fix leaking memory with multiple drefs.
  swscale: clip before assigning tables in RGB output functions.
  swscale: fix off-by-one in second coefficient in bilinear filters.

Conflicts:
libavformat/mov.c
libswscale/output.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoindeo5: check for unsupported luma block type
Michael Niedermayer [Sun, 15 Apr 2012 19:01:35 +0000 (21:01 +0200)]
indeo5: check for unsupported luma block type

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agotiffdec: check overread for packbits
Michael Niedermayer [Sun, 15 Apr 2012 18:19:42 +0000 (20:19 +0200)]
tiffdec: check overread for packbits

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoalsdec: fix number of decoded samples in first sub-block in BGMC mode.
Thilo Borgmann [Sun, 15 Apr 2012 16:07:12 +0000 (18:07 +0200)]
alsdec: fix number of decoded samples in first sub-block in BGMC mode.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agolzw: check for overread
Michael Niedermayer [Sun, 15 Apr 2012 16:13:50 +0000 (18:13 +0200)]
lzw: check for overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agopngdec: check bits_per_pixel for palette mode.
Michael Niedermayer [Sun, 15 Apr 2012 16:01:11 +0000 (18:01 +0200)]
pngdec: check bits_per_pixel for palette mode.

This fixes a out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agopng: make sure the previous frames dimensions match before using it as reference
Michael Niedermayer [Sun, 15 Apr 2012 15:41:17 +0000 (17:41 +0200)]
png: make sure the previous frames dimensions match before using it as reference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoerror: ensure error codes are signed negative ints.
Nicolas George [Sun, 15 Apr 2012 09:15:28 +0000 (11:15 +0200)]
error: ensure error codes are signed negative ints.

Based on a patch by Robert Nagy <ronag89@gmail.com>.

It makes a difference when the error code is immediately cast
into a larger integer, such as an int64_t.

8 years agoff_lag_rac_init: fix signedness error leading to out of array read.
Michael Niedermayer [Sun, 15 Apr 2012 14:40:49 +0000 (16:40 +0200)]
ff_lag_rac_init: fix signedness error leading to out of array read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoqdm2_fft_decode_tones: fix infinite loop
Michael Niedermayer [Sun, 15 Apr 2012 14:30:17 +0000 (16:30 +0200)]
qdm2_fft_decode_tones: fix infinite loop

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoqdm2: Check vlc_stage3_values index.
Michael Niedermayer [Sun, 15 Apr 2012 14:17:07 +0000 (16:17 +0200)]
qdm2: Check vlc_stage3_values index.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoSet bits_per_coded_sample when encoding Microsoft Video-1.
Carl Eugen Hoyos [Sun, 15 Apr 2012 14:35:03 +0000 (16:35 +0200)]
Set bits_per_coded_sample when encoding Microsoft Video-1.

Fixes ticket #1193.

8 years agoSupport decoding unaligned rgb24 lagarith.
Carl Eugen Hoyos [Sun, 15 Apr 2012 14:33:24 +0000 (16:33 +0200)]
Support decoding unaligned rgb24 lagarith.

Fixes ticket #1214.

8 years agodoc: Improve suggested Emacs settings for our coding style.
Diego Biurrun [Sat, 14 Apr 2012 17:24:16 +0000 (19:24 +0200)]
doc: Improve suggested Emacs settings for our coding style.

Switch from changing global values to defining a separate C style
and add appropriate settings for indenting assignments that span
more than one line.

8 years agoxan: check for vector_segment overread
Michael Niedermayer [Sun, 15 Apr 2012 13:36:38 +0000 (15:36 +0200)]
xan: check for vector_segment overread

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoeatgv: check vector_bits
Michael Niedermayer [Sun, 15 Apr 2012 13:29:50 +0000 (15:29 +0200)]
eatgv: check vector_bits

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agotiny_psnr: reindent after last commit.
Nicolas George [Sun, 15 Apr 2012 13:46:46 +0000 (15:46 +0200)]
tiny_psnr: reindent after last commit.

8 years agotiny_psnr: support unseekable raw files.
Nicolas George [Sun, 15 Apr 2012 12:20:42 +0000 (14:20 +0200)]
tiny_psnr: support unseekable raw files.

If either one of the files if not seekable,
do not try to read headers.

It allows to use it with pipes on whole rawvideo data.

8 years agoff_ivi_decode_blocks: fix negative scan_pos case.
Michael Niedermayer [Sun, 15 Apr 2012 12:58:06 +0000 (14:58 +0200)]
ff_ivi_decode_blocks: fix negative scan_pos case.

Fixes out of global array read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoindeo: Check allocated tile size in ff_ivi_process_empty_tile()
Michael Niedermayer [Sun, 15 Apr 2012 12:16:55 +0000 (14:16 +0200)]
indeo: Check allocated tile size in ff_ivi_process_empty_tile()

This prevents writing into a too small array if some parameters changed
without the tile being reallocated.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoindeo5: check tile size in decode_mb_info().
Michael Niedermayer [Sun, 15 Apr 2012 12:11:50 +0000 (14:11 +0200)]
indeo5: check tile size in decode_mb_info().

This prevents writing into a too small array if some parameters changed
without the tile being reallocated.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoconfigure: add dependencies for colormatrix test.
Nicolas George [Sun, 15 Apr 2012 11:10:26 +0000 (13:10 +0200)]
configure: add dependencies for colormatrix test.

8 years agoindeo5: set transform_size like indeo4 does to prevent useage of too large transforms.
Michael Niedermayer [Sun, 15 Apr 2012 11:33:18 +0000 (13:33 +0200)]
indeo5: set transform_size like indeo4 does to prevent useage of too large transforms.

I dont know if this is needed, its a precautionary change.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoindeo4: check transform size.
Michael Niedermayer [Sun, 15 Apr 2012 11:26:19 +0000 (13:26 +0200)]
indeo4: check transform size.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoutvideo: Remove unused variable 'src_size'
Derek Buitenhuis [Sat, 14 Apr 2012 21:26:58 +0000 (17:26 -0400)]
utvideo: Remove unused variable 'src_size'

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
8 years agoutvideo: Remove unused variable 'src_size'
Derek Buitenhuis [Sat, 14 Apr 2012 21:26:58 +0000 (17:26 -0400)]
utvideo: Remove unused variable 'src_size'

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
8 years agomov: free memory on header parsing failure
Dale Curtis [Sun, 15 Apr 2012 00:48:42 +0000 (17:48 -0700)]
mov: free memory on header parsing failure

Call mov_read_close when mov_read_header fails.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agomov: fix leaking memory with multiple drefs.
Dale Curtis [Fri, 13 Apr 2012 00:56:57 +0000 (17:56 -0700)]
mov: fix leaking memory with multiple drefs.

Instead of allocating over the original, free first. MOVStreamContext
is zero initialized so no double free will occur. Same style as other
fixes for the same problem in this file.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoswscale: clip before assigning tables in RGB output functions.
Ronald S. Bultje [Fri, 13 Apr 2012 21:42:21 +0000 (14:42 -0700)]
swscale: clip before assigning tables in RGB output functions.

8 years agoswscale: fix off-by-one in second coefficient in bilinear filters.
Ronald S. Bultje [Fri, 13 Apr 2012 21:37:47 +0000 (14:37 -0700)]
swscale: fix off-by-one in second coefficient in bilinear filters.

If coefficient A is 12-bits xixed-point number "X", then the other
coefficient is (1 << 12) - X, not (1 << 12) - X - 1.

8 years agompegvideo_enc: fix dts
Michael Niedermayer [Sat, 14 Apr 2012 23:08:13 +0000 (01:08 +0200)]
mpegvideo_enc: fix dts

Fixes Ticket1200

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 14 Apr 2012 19:49:01 +0000 (21:49 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  vsrc_buffer: fix check from 7ae7c41.
  libxvid: Reorder functions to avoid forward declarations; make functions static.
  libxvid: drop some pointless dead code
  wmal: vertical alignment cosmetics
  wmal: Warn about missing bitstream splicing feature and ask for sample.
  wmal: Skip seekable_frame_in_packet.
  wmal: Drop unused variable num_possible_block_size.
  avfiltergraph: make the AVFilterInOut alloc/free API public
  graphparser: allow specifying sws flags in the graph description.
  graphparser: fix the order of connecting unlabeled links.
  graphparser: add avfilter_graph_parse2().
  vsrc_buffer: allow using a NULL buffer to signal EOF.
  swscale: handle last pixel if lines have an odd width.
  qdm2: fix a dubious pointer cast
  WMAL: Do not try to read rawpcm coefficients if bits is invalid
  mov: Fix detecting there is no sync sample.
  tiffdec: K&R cosmetics
  avf: has_duration does not check the global one
  dsputil: fix optimized emu_edge function on Win64.

Conflicts:
doc/APIchanges
libavcodec/libxvid_rc.c
libavcodec/libxvidff.c
libavcodec/tiff.c
libavcodec/wmalosslessdec.c
libavfilter/avfiltergraph.h
libavfilter/graphparser.c
libavfilter/version.h
libavfilter/vsrc_buffer.c
libswscale/output.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoindeo4: setup width/height properly.
Michael Niedermayer [Sat, 14 Apr 2012 18:04:05 +0000 (20:04 +0200)]
indeo4: setup width/height properly.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomatroskadec: fix null pointer dereference
Michael Niedermayer [Sat, 14 Apr 2012 17:33:24 +0000 (19:33 +0200)]
matroskadec: fix null pointer dereference

Fixes: Ticket1206
Found-by: John Villamil
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovsrc_buffer: fix check from 7ae7c41.
Anton Khirnov [Sat, 14 Apr 2012 10:49:27 +0000 (12:49 +0200)]
vsrc_buffer: fix check from 7ae7c41.

The user submitted variable in this function is frame, not buf.

8 years agowtvdec: fix name_size check to consider integer overflows.
Michael Niedermayer [Sat, 14 Apr 2012 16:32:36 +0000 (18:32 +0200)]
wtvdec: fix name_size check to consider integer overflows.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agolagarith: check count before writing zeros.
Michael Niedermayer [Sat, 14 Apr 2012 16:28:31 +0000 (18:28 +0200)]
lagarith: check count before writing zeros.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoClear residues only in not coded channel. This fixes overwriting coded residues with...
Jakub Stachowski [Sat, 14 Apr 2012 13:44:39 +0000 (15:44 +0200)]
Clear residues only in not coded channel. This fixes overwriting coded residues with zeros if first channel is coded and second is not.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agolatmenc: replace per-frame malloc/free by constant size buffer.
Reimar Döffinger [Wed, 11 Apr 2012 22:23:28 +0000 (00:23 +0200)]
latmenc: replace per-frame malloc/free by constant size buffer.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agoavidec: handle 0-size packets that exist only in index.
Reimar Döffinger [Fri, 13 Apr 2012 21:34:43 +0000 (23:34 +0200)]
avidec: handle 0-size packets that exist only in index.

0-sized packets are used to implement variable fps.
However there seems to be a variation where these are not
even stored in the main file but as 0-size index entries
only.
This fixes the sample in trac issue #957, it now plays both
the same ways as in MPlayer and in a way that looks correct.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agomp3enc: clarify meaning of "Unsupported" messages.
Reimar Döffinger [Fri, 13 Apr 2012 22:47:53 +0000 (00:47 +0200)]
mp3enc: clarify meaning of "Unsupported" messages.

They will only cause us to skip writing the Xing header,
not cause any serious breakage.
Related to trac issue #1027.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
8 years agolibxvid: Reorder functions to avoid forward declarations; make functions static.
Diego Biurrun [Thu, 12 Apr 2012 11:43:09 +0000 (13:43 +0200)]
libxvid: Reorder functions to avoid forward declarations; make functions static.

8 years agolibxvid: drop some pointless dead code
Diego Biurrun [Thu, 12 Apr 2012 11:42:09 +0000 (13:42 +0200)]
libxvid: drop some pointless dead code

8 years agowmalosslessdec: Reset put bit buffer when num_saved_bits is reset.
Michael Niedermayer [Sat, 14 Apr 2012 14:32:56 +0000 (16:32 +0200)]
wmalosslessdec: Reset put bit buffer when num_saved_bits is reset.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmal: vertical alignment cosmetics
Mashiat Sarker Shakkhar [Fri, 13 Apr 2012 21:00:22 +0000 (14:00 -0700)]
wmal: vertical alignment cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agowmal: Warn about missing bitstream splicing feature and ask for sample.
Mashiat Sarker Shakkhar [Fri, 13 Apr 2012 21:00:21 +0000 (14:00 -0700)]
wmal: Warn about missing bitstream splicing feature and ask for sample.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agowmal: Skip seekable_frame_in_packet.
Mashiat Sarker Shakkhar [Fri, 13 Apr 2012 21:00:20 +0000 (14:00 -0700)]
wmal: Skip seekable_frame_in_packet.

There is no point in storing the value in a variable, since it is not
used anywhere else in the decoder.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agowmal: Drop unused variable num_possible_block_size.
Mashiat Sarker Shakkhar [Fri, 13 Apr 2012 21:00:19 +0000 (14:00 -0700)]
wmal: Drop unused variable num_possible_block_size.

This is probably a leftover from WMA Pro.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years agowmalosslessdec: Fix reading too many bits in decode_channel_residues()
Michael Niedermayer [Sat, 14 Apr 2012 12:51:24 +0000 (14:51 +0200)]
wmalosslessdec: Fix reading too many bits in decode_channel_residues()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmalosslessdec: fix a get_bits(0) in decode_ac_filter
Michael Niedermayer [Sat, 14 Apr 2012 12:50:25 +0000 (14:50 +0200)]
wmalosslessdec: fix a get_bits(0) in decode_ac_filter

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmalosslessdec: make mclms arrays big enough for whats written into them.
Michael Niedermayer [Sat, 14 Apr 2012 12:49:22 +0000 (14:49 +0200)]
wmalosslessdec: make mclms arrays big enough for whats written into them.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmalosslessdec: Make arrays WMALL_BLOCK_MAX_SIZE big and check samples_per_frame.
Michael Niedermayer [Sat, 14 Apr 2012 11:34:14 +0000 (13:34 +0200)]
wmalosslessdec: Make arrays WMALL_BLOCK_MAX_SIZE big and check samples_per_frame.

The samples_per_frame check is ported from wmaprodec.c

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmaprodec: check min_samples_per_subframe
Michael Niedermayer [Sat, 14 Apr 2012 11:13:32 +0000 (13:13 +0200)]
wmaprodec: check min_samples_per_subframe

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmaprodec; fix get_bits(0) case.
Michael Niedermayer [Sat, 14 Apr 2012 10:03:04 +0000 (12:03 +0200)]
wmaprodec; fix get_bits(0) case.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agowmaprodec: check num_vec_coeffs for validity
Michael Niedermayer [Sat, 14 Apr 2012 09:07:11 +0000 (11:07 +0200)]
wmaprodec: check num_vec_coeffs for validity

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agolavf: print with debug level the byte positions before and after find_stream_info
Michael Niedermayer [Sat, 14 Apr 2012 08:43:35 +0000 (10:43 +0200)]
lavf: print with debug level the byte positions before and after find_stream_info

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoavfiltergraph: make the AVFilterInOut alloc/free API public
Stefano Sabatini [Sat, 11 Jun 2011 13:30:46 +0000 (15:30 +0200)]
avfiltergraph: make the AVFilterInOut alloc/free API public

This is required for letting applications to create and destroy
AVFilterInOut structs in a convenient way.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agographparser: allow specifying sws flags in the graph description.
Anton Khirnov [Mon, 9 Apr 2012 04:13:53 +0000 (06:13 +0200)]
graphparser: allow specifying sws flags in the graph description.

8 years agographparser: fix the order of connecting unlabeled links.
Anton Khirnov [Mon, 9 Apr 2012 03:01:05 +0000 (05:01 +0200)]
graphparser: fix the order of connecting unlabeled links.

Right now, e.g. scale,[in]overlay would connect scale to the first
overlay input and [in] to the second, which goes against the
documentation and is unintuitive.

The bug happens because of the ordering mess in curr_inputs variable:
1) the unlabeled links from the previous filter are added to it in
correct order
2) input labels are parsed and inserted to the beginning one by one
(i.e. in reverse order)
3) curr_inputs is matched against filter inputs in reverse order

Fix the problem by always using proper ordering without trying to be
clever.

8 years agographparser: add avfilter_graph_parse2().
Anton Khirnov [Wed, 21 Mar 2012 06:46:56 +0000 (07:46 +0100)]
graphparser: add avfilter_graph_parse2().

Unlike avfilter_graph_parse(), it returns unlinked inputs and outputs
to the caller, which allows parsing of graphs where inputs/outputs are
not known in advance.

8 years agovsrc_buffer: allow using a NULL buffer to signal EOF.
Anton Khirnov [Sun, 1 Apr 2012 16:53:58 +0000 (18:53 +0200)]
vsrc_buffer: allow using a NULL buffer to signal EOF.

8 years agomp3on4: allocate a large enough frame.
Michael Niedermayer [Fri, 13 Apr 2012 22:07:38 +0000 (00:07 +0200)]
mp3on4: allocate a large enough frame.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoavidec: update size when packet is shrunk
Michael Niedermayer [Fri, 13 Apr 2012 21:56:26 +0000 (23:56 +0200)]
avidec: update size when packet is shrunk

Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswscale: handle last pixel if lines have an odd width.
Ronald S. Bultje [Fri, 6 Apr 2012 00:30:19 +0000 (17:30 -0700)]
swscale: handle last pixel if lines have an odd width.

Fixes bug 270.

8 years agolavfi/drawbox: fix width displayed in place of x.
Clément Bœsch [Fri, 13 Apr 2012 21:11:39 +0000 (23:11 +0200)]
lavfi/drawbox: fix width displayed in place of x.

8 years agodfa: Fix out of array write in decode_dds1()
Michael Niedermayer [Fri, 13 Apr 2012 20:57:23 +0000 (22:57 +0200)]
dfa: Fix out of array write in decode_dds1()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agodfa: fix out of array write in decode_wdlt()
Michael Niedermayer [Fri, 13 Apr 2012 20:52:16 +0000 (22:52 +0200)]
dfa: fix out of array write in decode_wdlt()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoqdm2: fix a dubious pointer cast
Mans Rullgard [Fri, 13 Apr 2012 16:43:54 +0000 (17:43 +0100)]
qdm2: fix a dubious pointer cast

This reworks a loop to get rid of an ugly pointer cast,
fixing errors seen with the PathScale ENZO compiler.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoWMAL: Do not try to read rawpcm coefficients if bits is invalid
Michael Niedermayer [Fri, 13 Apr 2012 14:40:53 +0000 (07:40 -0700)]
WMAL: Do not try to read rawpcm coefficients if bits is invalid

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agomov: Fix detecting there is no sync sample.
Yusuke Nakamura [Fri, 13 Apr 2012 09:59:14 +0000 (18:59 +0900)]
mov: Fix detecting there is no sync sample.

Stss atom without entries doesn't mean every sample is a sync sample.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agotiffdec: K&R cosmetics
Alex Converse [Fri, 13 Apr 2012 01:28:37 +0000 (18:28 -0700)]
tiffdec: K&R cosmetics

8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Fri, 13 Apr 2012 19:21:15 +0000 (21:21 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  swscale: K&R formatting cosmetics (part II)
  tiffdec: Add a malloc check and refactor another.
  faxcompr: Check malloc results and unify return path
  configure: escape colons in values written to config.fate
  ac3dsp: call femms/emms at the end of float_to_fixed24() for 3DNow and SSE
  matroska: Fix leaking memory allocated for laces.
  pthread: Fix crash due to fctx->delaying not being cleared.
  vp3: Assert on invalid filter_limit values.
  h264: fix 10bit biweight functions after recent x86inc.asm fixes.
  ffv1: Fix size mismatch in encode_line.
  movenc: Remove a dead initialization
  git-howto: Explain how to avoid Windows line endings in git checkouts.
  build: Move all arch OBJS declarations into arch subdirectory Makefiles.

Conflicts:
configure
libavcodec/vp3.c
libavformat/matroskadec.c
libavutil/Makefile
libswscale/Makefile
libswscale/swscale.c
libswscale/swscale_internal.h
libswscale/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoavf: has_duration does not check the global one
Luca Barbato [Fri, 13 Apr 2012 05:00:57 +0000 (22:00 -0700)]
avf: has_duration does not check the global one

Some container formats report a global duration, but not a per stream
one.

8 years agodsputil: fix optimized emu_edge function on Win64.
Ronald S. Bultje [Fri, 13 Apr 2012 18:06:39 +0000 (11:06 -0700)]
dsputil: fix optimized emu_edge function on Win64.

Recent register allocation changes (x86inc.asm update) changed the
register order and thus opcodes for the inner loops. One of them became
>128bytes, which confuses other parts of this function where it jumps
to fixed-offset positions to extend the edge by fixed amounts. A simple
register change fixes this.

8 years agoswscale: K&R formatting cosmetics (part II)
Diego Biurrun [Sun, 1 Apr 2012 08:34:10 +0000 (10:34 +0200)]
swscale: K&R formatting cosmetics (part II)

Also adjust some comments including wording and typo fixes.

8 years agotiffdec: Add a malloc check and refactor another.
Alex Converse [Fri, 13 Apr 2012 01:22:07 +0000 (18:22 -0700)]
tiffdec: Add a malloc check and refactor another.

8 years agofaxcompr: Check malloc results and unify return path
Alex Converse [Fri, 13 Apr 2012 01:10:57 +0000 (18:10 -0700)]
faxcompr: Check malloc results and unify return path

8 years agoav_image_alloc: Align the width to 8 when align >= 8.
Michael Niedermayer [Thu, 12 Apr 2012 19:03:19 +0000 (21:03 +0200)]
av_image_alloc: Align the width to 8 when align >= 8.

This allows simd optimized routines to work in steps of 8 pixels
without going over the linesize. (this matters for yuv->rgb24 for example)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agocmdutils: fix "oswr may be used uninitialized" warning
Michael Niedermayer [Fri, 13 Apr 2012 16:38:10 +0000 (18:38 +0200)]
cmdutils: fix "oswr may be used uninitialized" warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoavpicture_layout: use a endian independant format for the palette.
Michael Niedermayer [Fri, 13 Apr 2012 16:21:51 +0000 (18:21 +0200)]
avpicture_layout: use a endian independant format for the palette.

This should fix the failing fate PAL8 tests.

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