ffmpeg.git
7 years agoDrop unnecessary av_uninit attributes from some variable declarations.
Diego Biurrun [Mon, 13 Feb 2012 07:24:00 +0000 (08:24 +0100)]
Drop unnecessary av_uninit attributes from some variable declarations.

Recent versions of gcc (4.4+) no longer give false positive warnings.

7 years agomovenc: Support muxing wmapro in ismv/isma
Martin Storsjö [Mon, 23 Jan 2012 12:58:38 +0000 (14:58 +0200)]
movenc: Support muxing wmapro in ismv/isma

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agompegtsenc: Add an AVOption for forcing a new PAT/PMT/SDT to be written
Martin Storsjö [Sun, 29 Jan 2012 00:12:06 +0000 (02:12 +0200)]
mpegtsenc: Add an AVOption for forcing a new PAT/PMT/SDT to be written

When segmenting the output from the mpegts muxer, one can
now set this option when cutting to a new segment, to make sure
the next segment starts with PAT/PMT/SDT.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoswscale: move YUV2PACKED16WRAPPER() macro down to where it is used.
Ronald S. Bultje [Mon, 13 Feb 2012 01:10:32 +0000 (17:10 -0800)]
swscale: move YUV2PACKED16WRAPPER() macro down to where it is used.

7 years agoswscale: handle gray16 as a "planar" YUV format (Y-only, of course).
Ronald S. Bultje [Mon, 13 Feb 2012 01:07:09 +0000 (17:07 -0800)]
swscale: handle gray16 as a "planar" YUV format (Y-only, of course).

This allows removing any gray16-specific code, which is essentially
identical to the per-plane code in yuv2plane*().

7 years agoswscale: use yuv2packed1() functions for unscaled chroma also.
Ronald S. Bultje [Sun, 12 Feb 2012 23:48:24 +0000 (15:48 -0800)]
swscale: use yuv2packed1() functions for unscaled chroma also.

7 years agoswscale: fix incorrect chroma bias in yuv2rgb48_1_c().
Ronald S. Bultje [Sun, 12 Feb 2012 23:55:44 +0000 (15:55 -0800)]
swscale: fix incorrect chroma bias in yuv2rgb48_1_c().

7 years agoswscale: fix invalid memory accesses in yuvpacked1() functions.
Ronald S. Bultje [Sun, 12 Feb 2012 23:47:14 +0000 (15:47 -0800)]
swscale: fix invalid memory accesses in yuvpacked1() functions.

7 years agoMove PS2 MMI code below the mips subdirectory, where it belongs.
Diego Biurrun [Tue, 7 Feb 2012 14:06:09 +0000 (15:06 +0100)]
Move PS2 MMI code below the mips subdirectory, where it belongs.

Also give a more suitable name to the MMI-optimized IDCT;
it is not PS2-specific, as the name currently suggests.

7 years agomips: Move MMI function declarations to a header.
Diego Biurrun [Sat, 11 Feb 2012 20:56:37 +0000 (21:56 +0100)]
mips: Move MMI function declarations to a header.

This fixes compilation with -Werror=missing-prototypes.

7 years agobuild: Set correct dependencies for rtmp* protocols implemented by librtmp.
Diego Biurrun [Fri, 10 Feb 2012 19:29:29 +0000 (20:29 +0100)]
build: Set correct dependencies for rtmp* protocols implemented by librtmp.

7 years agoswscale: convert yuv2yuvX() to using named arguments.
Ronald S. Bultje [Sun, 12 Feb 2012 01:51:52 +0000 (17:51 -0800)]
swscale: convert yuv2yuvX() to using named arguments.

7 years agoswscale: rename "dstw" to "w" to prevent name collisions.
Ronald S. Bultje [Sun, 12 Feb 2012 02:46:12 +0000 (18:46 -0800)]
swscale: rename "dstw" to "w" to prevent name collisions.

"dstw" can collide with the word-version of the "dst" argument, causing
all kind of weird stuff down the pipe.

7 years agoswscale: use named registers in yuv2yuv1_plane() place.
Ronald S. Bultje [Sun, 12 Feb 2012 01:02:29 +0000 (17:02 -0800)]
swscale: use named registers in yuv2yuv1_plane() place.

Most of the function had been converted before, but I forgot this
particular location.

7 years agolavf: fix aspect ratio mismatch message.
Andrey Utkin [Sun, 12 Feb 2012 14:46:46 +0000 (16:46 +0200)]
lavf: fix aspect ratio mismatch message.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agoavconv: set AVFormatContext.duration from '-t'
Andrey Utkin [Sun, 5 Feb 2012 14:49:14 +0000 (16:49 +0200)]
avconv: set AVFormatContext.duration from '-t'

Set output files duration to recording_time option, if given.
Rationale: to save duration into metadata for file that is written to
non-seekable output, for formats like FLV (with metadata at beginning).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agocljr: implement encode2.
Anton Khirnov [Sat, 11 Feb 2012 19:39:12 +0000 (20:39 +0100)]
cljr: implement encode2.

7 years agocljr: set the properties of the coded_frame, not input frame.
Anton Khirnov [Sat, 11 Feb 2012 19:37:41 +0000 (20:37 +0100)]
cljr: set the properties of the coded_frame, not input frame.

7 years agodnxhdenc: switch to encode2.
Anton Khirnov [Sat, 11 Feb 2012 19:03:42 +0000 (20:03 +0100)]
dnxhdenc: switch to encode2.

7 years agobmpenc: switch to encode2().
Anton Khirnov [Sat, 11 Feb 2012 18:44:05 +0000 (19:44 +0100)]
bmpenc: switch to encode2().

7 years agoFATE: update reference for seek-alac_mp4
Justin Ruggles [Sat, 11 Feb 2012 20:58:04 +0000 (15:58 -0500)]
FATE: update reference for seek-alac_mp4

This should have been updated in b590f3a7bf9103ac7a7a61c48568676201d6824b.

7 years agosunrast: Return AVERROR values instead of -1.
Aneesh Dogra [Sat, 11 Feb 2012 20:29:56 +0000 (01:59 +0530)]
sunrast: Return AVERROR values instead of -1.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agosunrast: Add support for gray8 decoding.
Aneesh Dogra [Sat, 11 Feb 2012 05:12:45 +0000 (10:42 +0530)]
sunrast: Add support for gray8 decoding.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
7 years agoswscale: enforce a minimum filtersize.
Ronald S. Bultje [Sat, 11 Feb 2012 16:42:28 +0000 (08:42 -0800)]
swscale: enforce a minimum filtersize.

At very small dimensions, this calculation could lead to zero-sized
filters, which leads to uninitialized output, zero-sized allocations,
loop overflows in SIMD that uses do{..}while(i++<filtersize); instead
of for(i=0;i<filtersize;i++){..} and several other similar failures.
Therefore, require a minimum filtersize of 1.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agoalacenc: use AVCodec.encode2()
Justin Ruggles [Fri, 3 Feb 2012 23:04:58 +0000 (18:04 -0500)]
alacenc: use AVCodec.encode2()

7 years agoalacenc: cosmetics: indentation
Justin Ruggles [Fri, 3 Feb 2012 22:56:49 +0000 (17:56 -0500)]
alacenc: cosmetics: indentation

7 years agoalacenc: consolidate bitstream writing into a single function.
Justin Ruggles [Fri, 3 Feb 2012 22:53:41 +0000 (17:53 -0500)]
alacenc: consolidate bitstream writing into a single function.

Simplifies use of verbatim mode.

7 years agoalacenc: only encode frame size in header for a final smaller frame
Justin Ruggles [Fri, 3 Feb 2012 22:27:31 +0000 (17:27 -0500)]
alacenc: only encode frame size in header for a final smaller frame

Otherwise it is not needed because it matches the frame size as encoded in
the extradata.

7 years agoalacenc: store current frame size in AlacEncodeContext.
Justin Ruggles [Thu, 2 Feb 2012 23:06:28 +0000 (18:06 -0500)]
alacenc: store current frame size in AlacEncodeContext.

This avoids an indirection and will simplify implementation of encode2()

7 years agoalacenc: return AVERROR codes in alac_encode_frame()
Justin Ruggles [Thu, 2 Feb 2012 21:11:17 +0000 (16:11 -0500)]
alacenc: return AVERROR codes in alac_encode_frame()

7 years agoalacenc: calculate a new max frame size for the final small frame
Justin Ruggles [Thu, 2 Feb 2012 21:03:41 +0000 (16:03 -0500)]
alacenc: calculate a new max frame size for the final small frame

Gives a better estimate of buffer requirements and a better decision of
whether or not to use verbatim mode.

7 years agoalacenc: pretty-printing and other cosmetics
Justin Ruggles [Thu, 2 Feb 2012 02:21:24 +0000 (21:21 -0500)]
alacenc: pretty-printing and other cosmetics

7 years agoalacenc: fix error handling and potential memleaks in alac_encode_init()
Justin Ruggles [Thu, 2 Feb 2012 01:54:34 +0000 (20:54 -0500)]
alacenc: fix error handling and potential memleaks in alac_encode_init()

7 years agoalacenc: do not set coded_frame->key_frame
Justin Ruggles [Thu, 2 Feb 2012 01:43:43 +0000 (20:43 -0500)]
alacenc: do not set coded_frame->key_frame

It is already set in avcodec_alloc_frame()

7 years agoalacenc: do not set bits_per_coded_sample
Justin Ruggles [Thu, 2 Feb 2012 01:41:40 +0000 (20:41 -0500)]
alacenc: do not set bits_per_coded_sample

encoded ALAC does not have a fixed number of bits per sample

7 years agoalacenc: remove unneeded frame_size check in alac_encode_frame()
Justin Ruggles [Thu, 2 Feb 2012 01:38:06 +0000 (20:38 -0500)]
alacenc: remove unneeded frame_size check in alac_encode_frame()

7 years agotta: error out if samplerate is zero.
Ronald S. Bultje [Fri, 10 Feb 2012 18:51:43 +0000 (10:51 -0800)]
tta: error out if samplerate is zero.

Prevents a division by zero later on.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agottadec: fix invalid free when an error occurs while decoding 24-bit tta
Justin Ruggles [Thu, 9 Feb 2012 19:49:59 +0000 (14:49 -0500)]
ttadec: fix invalid free when an error occurs while decoding 24-bit tta

7 years agowavpack: add needed braces for 2 statements inside an if block
Justin Ruggles [Sat, 11 Feb 2012 01:18:10 +0000 (20:18 -0500)]
wavpack: add needed braces for 2 statements inside an if block

7 years agov210enc: remove redundant check for pix_fmt
Paul B Mahol [Sun, 5 Feb 2012 21:14:33 +0000 (21:14 +0000)]
v210enc: remove redundant check for pix_fmt

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agowavpack: allow user to disable CRC checking
Paul B Mahol [Fri, 10 Feb 2012 18:51:57 +0000 (18:51 +0000)]
wavpack: allow user to disable CRC checking

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agov210enc: Use Bytestream2 functions
Aneesh Dogra [Wed, 8 Feb 2012 17:48:40 +0000 (23:18 +0530)]
v210enc: Use Bytestream2 functions

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agocafdec: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 10 Feb 2012 18:47:53 +0000 (18:47 +0000)]
cafdec: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agoyop: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:45 +0000 (19:13 +0000)]
yop: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agotta: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:44 +0000 (19:13 +0000)]
tta: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agotmv: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:43 +0000 (19:13 +0000)]
tmv: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agor3d: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:42 +0000 (19:13 +0000)]
r3d: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agonsvdec: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:41 +0000 (19:13 +0000)]
nsvdec: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agompc8: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:40 +0000 (19:13 +0000)]
mpc8: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agojvdec: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:39 +0000 (19:13 +0000)]
jvdec: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agofilmstripdec: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:38 +0000 (19:13 +0000)]
filmstripdec: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agoffmdec: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:37 +0000 (19:13 +0000)]
ffmdec: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agodv: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:36 +0000 (19:13 +0000)]
dv: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agobink: Check return value of avio_seek and avoid modifying state if it fails
Joakim Plate [Fri, 3 Feb 2012 19:13:34 +0000 (19:13 +0000)]
bink: Check return value of avio_seek and avoid modifying state if it fails

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agoCheck AVCodec.pix_fmts in avcodec_open2()
Paul B Mahol [Fri, 10 Feb 2012 00:05:14 +0000 (00:05 +0000)]
Check AVCodec.pix_fmts in avcodec_open2()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agosvq3: Prevent illegal reads while parsing extradata.
Alex Converse [Fri, 10 Feb 2012 04:21:47 +0000 (20:21 -0800)]
svq3: Prevent illegal reads while parsing extradata.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7 years agoremove ParseContext1
Rafaël Carré [Thu, 9 Feb 2012 00:34:37 +0000 (19:34 -0500)]
remove ParseContext1

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agovc1: use ff_parse_close
Rafaël Carré [Wed, 8 Feb 2012 22:46:51 +0000 (17:46 -0500)]
vc1: use ff_parse_close

It works as long as ParseContext is the first member of the private struct

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agompegvideo parser: move specific fields into private context
Rafaël Carré [Wed, 8 Feb 2012 22:46:50 +0000 (17:46 -0500)]
mpegvideo parser: move specific fields into private context

This obviates using ParseContext1, which is slated for removal.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agompeg4video parser: move specific fields into private context
Rafaël Carré [Fri, 10 Feb 2012 01:26:17 +0000 (20:26 -0500)]
mpeg4video parser: move specific fields into private context

This obviates using ParseContext1, which is slated for removal.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agocavs parser: fix parser context type
Rafaël Carré [Wed, 8 Feb 2012 22:46:48 +0000 (17:46 -0500)]
cavs parser: fix parser context type

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years ago4xm, timefilter: K&R formatting cosmetics
Yordan Makariev [Wed, 11 Jan 2012 19:27:20 +0000 (21:27 +0200)]
4xm, timefilter: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agortpenc: Write a log message if the max packet size is too small
Martin Storsjö [Thu, 9 Feb 2012 21:28:01 +0000 (23:28 +0200)]
rtpenc: Write a log message if the max packet size is too small

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoh264: disallow constrained intra prediction modes for luma.
Ronald S. Bultje [Fri, 10 Feb 2012 06:57:01 +0000 (22:57 -0800)]
h264: disallow constrained intra prediction modes for luma.

Conversion of the luma intra prediction mode to one of the constrained
("alzheimer") ones can happen by crafting special bitstreams, causing
a crash because we'll call a NULL function pointer for 16x16 block intra
prediction, since constrained intra prediction functions are only
implemented for chroma (8x8 blocks).

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
7 years agodv: Move tables from dvdata.h to dvdata.c
Alex Converse [Fri, 10 Feb 2012 01:56:29 +0000 (17:56 -0800)]
dv: Move tables from dvdata.h to dvdata.c

7 years agodv: Move a table used only by the demuxer out of a shared header.
Alex Converse [Fri, 10 Feb 2012 01:53:05 +0000 (17:53 -0800)]
dv: Move a table used only by the demuxer out of a shared header.

7 years agodv: Move functions used only by the encoder out of a shared header.
Alex Converse [Fri, 10 Feb 2012 01:49:57 +0000 (17:49 -0800)]
dv: Move functions used only by the encoder out of a shared header.

7 years agodv: Split dvdata.h into dvdata.h and dvquant.h
Alex Converse [Fri, 10 Feb 2012 01:44:47 +0000 (17:44 -0800)]
dv: Split dvdata.h into dvdata.h and dvquant.h

7 years agodv: Fix small overread in audio frequency table.
Alex Converse [Fri, 10 Feb 2012 01:11:55 +0000 (17:11 -0800)]
dv: Fix small overread in audio frequency table.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
7 years agoavcodec: set avpkt->size to 0 if encode2() did not output a packet
Justin Ruggles [Tue, 7 Feb 2012 19:31:49 +0000 (14:31 -0500)]
avcodec: set avpkt->size to 0 if encode2() did not output a packet

7 years agoavcodec: for audio encoding, set packet dts to packet pts.
Justin Ruggles [Tue, 7 Feb 2012 00:08:32 +0000 (19:08 -0500)]
avcodec: for audio encoding, set packet dts to packet pts.

There are no audio encoders which do frame reordering.

7 years agoac3dsp: do not use pshufb in ac3_extract_exponents_ssse3()
Justin Ruggles [Thu, 9 Feb 2012 18:00:30 +0000 (13:00 -0500)]
ac3dsp: do not use pshufb in ac3_extract_exponents_ssse3()

We need to do unsigned saturation in order to cover the corner case when the
absolute coefficient value is 16777215 (the maximum value).

Fixes Bug #216

7 years agoac3dec: Move center and surround mix level tables to the parser.
Michael Niedermayer [Fri, 3 Feb 2012 03:27:27 +0000 (22:27 -0500)]
ac3dec: Move center and surround mix level tables to the parser.

That way all mix levels as exported by avpriv_ac3_parse_header()
will have the same meaning.

Previously the 3-bit center mix level for E-AC-3 was used to index in a
4-entry table, leading to out-of-array reads.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
7 years agoaacdec: Unify preconfigured layout and PCE layout.
Alex Converse [Wed, 8 Feb 2012 18:10:34 +0000 (10:10 -0800)]
aacdec: Unify preconfigured layout and PCE layout.

7 years agoaacdec: Support native channel layout when requested.
Alex Converse [Fri, 3 Feb 2012 02:59:15 +0000 (18:59 -0800)]
aacdec: Support native channel layout when requested.

7 years agoaacdec: Try to sniff a reasonable channel layout for PCE based configurations.
Alex Converse [Tue, 31 Jan 2012 23:54:21 +0000 (15:54 -0800)]
aacdec: Try to sniff a reasonable channel layout for PCE based configurations.

This changes the output order of multichannel PCE based streams.

7 years agolibavcodec: Don't do av_free(av_malloc(0)) for bitstream filters
Martin Storsjö [Wed, 8 Feb 2012 13:01:13 +0000 (15:01 +0200)]
libavcodec: Don't do av_free(av_malloc(0)) for bitstream filters

This fixes crashes on exit when closing a bitstream filter that
hasn't allocated any private data, on OS X.

Signed-off-by: Martin Storsjö <martin@martin.st>
7 years agoeac3dec: replace undefined 1<<31 with INT32_MIN in noise generation
Janne Grunau [Thu, 9 Feb 2012 19:46:08 +0000 (20:46 +0100)]
eac3dec: replace undefined 1<<31 with INT32_MIN in noise generation

7 years agoyadif: specify array size outside DECLARE_ALIGNED
Janne Grunau [Thu, 9 Feb 2012 19:27:12 +0000 (20:27 +0100)]
yadif: specify array size outside DECLARE_ALIGNED

7 years agoprores: specify array size outside DECLARE_ALIGNED brackets.
Ronald S. Bultje [Thu, 9 Feb 2012 19:00:01 +0000 (11:00 -0800)]
prores: specify array size outside DECLARE_ALIGNED brackets.

7 years agoWavPack demuxer: set packet duration
Paul B Mahol [Wed, 8 Feb 2012 22:17:54 +0000 (22:17 +0000)]
WavPack demuxer: set packet duration

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
7 years agotta: use skip_bits_long()
Paul B Mahol [Sun, 5 Feb 2012 19:39:13 +0000 (19:39 +0000)]
tta: use skip_bits_long()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
7 years agomxfdec: Ignore the last entry in Avid's index table segments
Tomas Härdin [Thu, 26 Jan 2012 12:21:30 +0000 (13:21 +0100)]
mxfdec: Ignore the last entry in Avid's index table segments

The last entry is the total size of the essence container.
Previously a TemporalOffset error would be logged, even though
segments like these are expected.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Sanity-check SampleRate
Tomas Härdin [Thu, 26 Jan 2012 13:12:50 +0000 (14:12 +0100)]
mxfdec: Sanity-check SampleRate

This avoids a SIGFPE if SampleRate is missing or set to naughty values.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Handle small EditUnitByteCount
Tomas Härdin [Thu, 26 Jan 2012 12:21:44 +0000 (13:21 +0100)]
mxfdec: Handle small EditUnitByteCount

These are common with audio atoms. Without this the demuxer would read two
bytes at a time for a mono 16-bit file.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Consider OPAtom files that do not have exactly one EC to be OP1a
Tomas Härdin [Thu, 26 Jan 2012 12:21:43 +0000 (13:21 +0100)]
mxfdec: Consider OPAtom files that do not have exactly one EC to be OP1a

This fixes demuxing of 2011_DCPTEST_24FPS.V.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows
Tomas Härdin [Thu, 26 Jan 2012 12:21:41 +0000 (13:21 +0100)]
mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflows

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()
Tomas Härdin [Thu, 26 Jan 2012 12:21:40 +0000 (13:21 +0100)]
mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()

This fixes SIGSEGV on files with both CBR and VBR index segments (zzuf6.mxf).

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Sanity check PreviousPartition
Tomas Härdin [Thu, 26 Jan 2012 12:21:39 +0000 (13:21 +0100)]
mxfdec: Sanity check PreviousPartition

Without this certain files could get the demuxer stuck in a loop.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Never seek back in local sets and KLVs
Tomas Härdin [Thu, 26 Jan 2012 12:21:38 +0000 (13:21 +0100)]
mxfdec: Never seek back in local sets and KLVs

Specially crafted files can lead the parsing code to take too long.
We fix a lot of these problems by not allowing local tags to extend
past the end of the set and not allowing other KLVs to be read past
the end of themselves.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Move the current_partition check inside mxf_read_header()
Tomas Härdin [Thu, 26 Jan 2012 12:21:37 +0000 (13:21 +0100)]
mxfdec: Move the current_partition check inside mxf_read_header()

This fixes SIGSEGV on files where this is the case, such as zzuf4.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Fix infinite loop in mxf_packet_timestamps()
Tomas Härdin [Thu, 26 Jan 2012 12:21:36 +0000 (13:21 +0100)]
mxfdec: Fix infinite loop in mxf_packet_timestamps()

This can happen if an index table segment has a very large IndexStartPosition.
zzuf3.mxf is an example of such a file.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Check eof_reached in mxf_read_local_tags()
Tomas Härdin [Thu, 26 Jan 2012 12:21:35 +0000 (13:21 +0100)]
mxfdec: Check eof_reached in mxf_read_local_tags()

This fixes an infinite loop with zzuf2.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Check for NULL component
Tomas Härdin [Thu, 26 Jan 2012 12:21:34 +0000 (13:21 +0100)]
mxfdec: Check for NULL component

This fixes a SIGSEGV with zzuf1.mxf.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()
Tomas Härdin [Thu, 26 Jan 2012 12:21:32 +0000 (13:21 +0100)]
mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()

Only the OPAtom demuxing logic is guaranteed to have index tables,
meaning OP1a files that lack an index would cause SIGSEGV.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agomxfdec: Make sure x < index_table->nb_ptses
Tomas Härdin [Thu, 26 Jan 2012 12:21:31 +0000 (13:21 +0100)]
mxfdec: Make sure x < index_table->nb_ptses

Avoids a SIGSEGV on files with IndexEntryCount < IndexDuration.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
7 years agobuild: Add missing directories to DIRS declarations.
Diego Biurrun [Wed, 8 Feb 2012 10:02:10 +0000 (11:02 +0100)]
build: Add missing directories to DIRS declarations.

7 years agoarm: Add missing #include to vp8.h to fix a make checkheaders warning.
Diego Biurrun [Wed, 8 Feb 2012 12:18:22 +0000 (13:18 +0100)]
arm: Add missing #include to vp8.h to fix a make checkheaders warning.

7 years agoswscale: ppc: Add missing header #includes to pass 'make checkheaders'.
Diego Biurrun [Wed, 8 Feb 2012 10:01:41 +0000 (11:01 +0100)]
swscale: ppc: Add missing header #includes to pass 'make checkheaders'.

7 years agocosmetics: Delete empty lines at end of file.
Diego Biurrun [Wed, 8 Feb 2012 09:39:18 +0000 (10:39 +0100)]
cosmetics: Delete empty lines at end of file.