Commit Graph

33103 Commits

Author SHA1 Message Date
Michael Niedermayer 420d1df2e2 apedec: check bits <= 32.
Fixes a floating-point exception further down.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-03-31 14:01:12 -04:00
Aneesh Dogra c265b77b11 cavs: Remove unused code.
The square is always passed as 1 whenever the function is called and
thus the if block never gets executed.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-31 08:14:54 -07:00
Reimar Döffinger 10b1c060f9 oggenc: fix condition when not to flush due to keyframe granule.
The previous condition of 0 page size was wrong,
that would disable the mechanism for all frames at
a start of a page, thus some keyframes still would not
get their own granule.
The real problem is that header packets must not be flushed,
but they have (and must have) 0 granule and thus would
be detected as keyframes.
Add a separate parameter to mark header packets.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-30 16:32:16 -04:00
Andres Gonzalez ed3e1b485a oggenc: add pagesize option to set preferred page size
When set, if an Ogg stream buffer has enough data, a page is made
instead of filling maximum-size pages. Using smaller pages results
smaller seek intervals at the expense of higher container overhead.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-30 16:32:03 -04:00
Justin Ruggles 67aec401d8 libspeexdec: set frame size in libspeex_decode_init()
This fixes speex decoding, which was broken in 85469f1c.
2012-03-30 16:30:37 -04:00
Franz Brauße 12cbbbb4ab smacker audio: sign-extend the initial 16-bit predicted value
Fixes Bug #265

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-30 14:44:11 -04:00
Diego Biurrun b691fd7a4d h264: drop ff_h264_ prefix from static function ff_h264_decode_rbsp_trailing() 2012-03-30 17:47:12 +02:00
Diego Biurrun 9ad80ef3db h264: Make ff_h264_decode_end() static, it is not used externally.
Also drop the now unnecessary ff_ prefix from its name.
2012-03-30 17:46:52 +02:00
Diego Biurrun afd8a3957b output-example: K&R formatting cosmetics, comment spelling fixes 2012-03-30 13:43:29 +02:00
Luca Barbato 93f6d0475f avf: make the example output the proper message
av_dump_format needs the codecs opened in order to print
them.
2012-03-29 17:07:19 -07:00
Luca Barbato 28db30aa29 avf: fix audio writing in the output-example
av_init_packet does not reset data and size fields in AVPacket,
avcodec_encode_audio2 can use preallocated AVPacket.
2012-03-29 17:07:19 -07:00
Ronald S. Bultje 4f7c7624c0 mov: don't overwrite existing indexes.
Prevents all kind of badness if files contain multiple
indexes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-29 11:36:14 -07:00
Ronald S. Bultje 0399fe0fd2 lzw: fix potential integer overflow. 2012-03-29 11:36:14 -07:00
Ronald S. Bultje b7b1509d06 truemotion: forbid invalid VLC bitsizes and token values.
SHOW_UBITS() is only defined up to n_bits is 25, therefore forbid
values larger than this in get_vlc2() (max_bits). tokens[][] can be
used as an index in deltas[], which has a size of 64, so ensure the
values are smaller than that.

This prevents crashes on corrupt bitstreams.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-29 11:36:14 -07:00
Ronald S. Bultje bf39d3b59d truemotion2: handle out-of-frame motion vectors through edge extension.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-29 11:36:11 -07:00
Martin Storsjö 9bd41bb191 configure: Check for a different SDL function
This one is available both in SDL 1.2 and in 1.3 (which is the current
version available e.g. in macports), while 1.3 doesn't contain
SDL_Linked_Version().

The current check for SDL_Linked_Version() (available since SDL 1.2.13)
was added in 8f1b06c8, because including the headers for SDL_Init()
redirects the main() function, requiring the main function signature
to match the one of SDL_main (including argc/argv).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-29 21:25:59 +03:00
Kostya Shishkov a05c41acd1 mp3dec: perform I/S and M/S only when frame mode is joint stereo.
Looks like some LAME versions produce dual stereo mode MP3s with
flags for intensity and middle stereo set. In this mode those flags
should be ignored like the reference decoder and derived ones do.
2012-03-29 19:08:05 +02:00
Kostya Shishkov f704eb612b id3v2: add another mimetype for JPEG image 2012-03-29 15:49:06 +02:00
Ronald S. Bultje ddcf67c8a5 lzw: prevent buffer overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 17:38:51 -07:00
Mashiat Sarker Shakkhar 28e8c4d59a WMAL: Remove inaccurate and unnecessary doxy
A call to decode_packet() does not always decode a complete WMA packet.
Moreover, this is not the correct place to document calls that are part
of the public API.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-03-29 01:47:03 +02:00
Ronald S. Bultje 63a1b481f6 h264: fix cabac-on-stack after safe cabac reader. 2012-03-28 16:35:42 -07:00
Ronald S. Bultje bd508d435b truemotion2: convert packet header reading to bytestream2.
Also use correct buffer sizes in calls to tm2_read_stream(). Together,
this prevents overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 12:29:26 -07:00
Ronald S. Bultje 44257ef426 asf: only set index_read if the index contained entries.
This allows falling back to a binary search if the file contains no
index, thus fixing seeking in such files (e.g. luckynight.wma).
2012-03-28 10:22:25 -07:00
Ronald S. Bultje a940198130 cabac: add overread protection to BRANCHLESS_GET_CABAC().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-03-28 08:01:29 -07:00
Ronald S. Bultje 448dc42571 cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje 16f6e83f74 cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje 951014e5bb cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje a0bdcb019e h264: add overread protection to get_cabac_bypass_sign_x86(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje 95bfa4ead7 h264: reindent get_cabac_bypass_sign_x86(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje db025929f2 h264: use struct offsets in get_cabac_bypass_sign_x86(). 2012-03-28 08:01:29 -07:00
Ronald S. Bultje 7374fac804 h264: fix overreads in cabac reader.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 08:01:28 -07:00
Ronald S. Bultje d360dd902c wmall: fix seeking. 2012-03-28 07:14:21 -07:00
Ronald S. Bultje 0a82f5275f lagarith: fix buffer overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-28 07:06:47 -07:00
Diego Biurrun c0b34e6148 dvdec: drop unnecessary dv_tablegen.h #include
dvdec.c uses nothing from dv_tablegen.h.  As a welcome side-effect, this
fixes compilation of that file with hardcoded tables enabled.
2012-03-28 15:51:43 +02:00
Mans Rullgard 2efb710a34 build: fix doc generation errors in parallel builds
The $(dir) function used to construct OBJDIRS includes a trailing slash
in the names returned, which GNU make 3.82 does not match to the
slash-less 'doc' in the documentation dependencies, causing parallel
build to fail.  Adding a slash fixes this and still works with make
3.81.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-03-28 11:42:19 +01:00
Diego Biurrun a92be9b856 Replace memset(0) by zero initializations.
Also remove one pointless zero initialization in rangecoder.c.
2012-03-28 09:38:33 +02:00
Diego Biurrun 856c8e0a04 faandct: Remove FAAN_POSTSCALE define and related code.
It is not a user-accessible option and unlikely to ever be changed.
2012-03-28 09:38:31 +02:00
Anton Khirnov a839dbb94e dvenc: print allowed profiles if the video doesn't conform to any of them. 2012-03-28 09:29:04 +02:00
Anton Khirnov 3c6607eb6f avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.
Otherwise realloc would free it, which would result in double free
later.
2012-03-28 09:28:47 +02:00
Anton Khirnov e2e165c00f FATE: add a test for vp8 with changing frame size. 2012-03-28 09:28:29 +02:00
Ronald S. Bultje e74d6daa29 fate: add kgv1 fate test.
Tested to be bit-exact across x86-64, x86-32 and ppc.
2012-03-27 17:54:04 -07:00
Justin Ruggles eed691f7d1 oggdec: calculate correct timestamps in Ogg/FLAC
We need to parse the individual packet durations when there is more than one
packet in a page.
2012-03-27 16:11:06 -04:00
Paul B Mahol 55abaa58e5 westwood_vqa: fix SND0 chunk handling
Version from vqa header does not dictate which sound chunks may
appear in file.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-27 11:58:15 -04:00
Paul B Mahol f0a343f399 westwood_vqa: set video stream duration
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-27 08:54:07 -07:00
Ronald S. Bultje 98df2e2414 raw: forward avpicture_fill() error code in raw_decode().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-27 08:54:07 -07:00
Diego Biurrun 8e0b7e2f14 build: Do not explicitly add the doc directory to the OBJDIRS list.
Now that a documentation generator is built in the doc directory,
this is no longer necessary.  Fixes the Make warning:
Makefile:188: target `doc' given more than once in the same rule.
2012-03-27 11:15:47 +02:00
Diego Biurrun d724fe665b dv: Split off DV video decoder into its own file. 2012-03-27 11:15:47 +02:00
Diego Biurrun 9f43fdda3e build: fix RALF decoder standalone compilation, which depends on Golomb code 2012-03-27 11:15:40 +02:00
Diego Biurrun d7ce1a48a5 configure: Drop stray duplicate entry for --disable-fft from help output. 2012-03-27 11:15:39 +02:00
Jindrich Makovicka 904100e5fc make av_interleaved_write_frame() flush packets when pkt is NULL
This patch allows the user to force flushing of all queued packets
by calling av_interleaved_write_frame() with pkt set to NULL.

Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-27 11:12:55 +03:00