Commit Graph

378 Commits

Author SHA1 Message Date
Michael Niedermayer 5555d2075a Merge commit 'ceb754d041f5f6327fd9195a5f43575af9516daa'
* commit 'ceb754d041f5f6327fd9195a5f43575af9516daa':
  lzo: Use AV_COPY*U macros where appropriate
  prepare 9_beta2 release
  dsputil: Replace AV_WNxx(AV_RNxx()) combinations by AV_COPYxxU
  intreadwrite: Add AV_COPYxxU macros for copying to/from unaligned addresses
  dxtory: Replace AV_WN16A(AV_RN16A()) combination by AV_COPY16
  mp3: properly forward mp_decode_frame errors

Conflicts:
	RELEASE
	libavcodec/mpegaudiodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-24 14:01:36 +02:00
Michael Niedermayer 79ec524ff5 Merge commit 'ec444c84cfd30ef34a4e7b4ec7ee77d7e5250d25'
* commit 'ec444c84cfd30ef34a4e7b4ec7ee77d7e5250d25':
  mpegaudiodec: Fix buffer handling on random access
  mpegaudio: Refactor mp3on4 flush function
  fate: Add dependencies for audio tests
  fate: cosmetics: Group idct8x8 test together with all other libavcodec tests
  fate: More fine-grained dependencies for libavcodec test programs

Conflicts:
	tests/fate/audio.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-23 15:08:55 +02:00
Luca Barbato 9ab0874ea8 mp3: properly forward mp_decode_frame errors
The function can return either a parsing error or a memory management
error.
2012-10-23 14:22:16 +02:00
Luca Barbato 0c03cc6838 mp3: exit on parsing error in mp_decode_frame
Properly forward mp_decode_layer3 errors, mp_decode_layer1 and
mp_decode_layer2 do not return errors.

Based on a patch by Michael Niedermayer.
2012-10-23 14:22:16 +02:00
Michael Niedermayer ec444c84cf mpegaudiodec: Fix buffer handling on random access 2012-10-23 10:52:25 +02:00
Diego Biurrun 2f17f265ed mpegaudio: Refactor mp3on4 flush function 2012-10-23 10:52:25 +02:00
Michael Niedermayer 5713091818 mpegaudiodec: Fix buffer handling on random access
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 20:59:08 +02:00
Michael Niedermayer 7696a392e2 mp3dec: propagate error code correctly.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-21 02:52:10 +02:00
Michael Niedermayer 31ab1575e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Convert some commented-out printf/av_log instances to av_dlog
  avcodec: Drop silly and/or broken printf debug output
  avcodec: Drop some silly commented-out av_log() invocations
  avformat: Convert some commented-out printf/av_log instances to av_dlog
  avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
  Remove some silly disabled code.
  ac3dec: ensure get_buffer() gets a buffer for the correct number of channels

Conflicts:
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/mjpegdec.c
	libavcodec/motion_est_template.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/put_bits.h
	libavcodec/ratecontrol.c
	libavcodec/wmaenc.c
	libavdevice/timefilter.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/flvenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-01 16:12:38 +02:00
Diego Biurrun 1218777ffd avcodec: Convert some commented-out printf/av_log instances to av_dlog 2012-10-01 10:24:28 +02:00
Diego Biurrun 6f6b0311a3 avcodec: Drop some silly commented-out av_log() invocations 2012-10-01 10:24:28 +02:00
Luca Barbato 97cfa55eea mpegaudiodec: fix short_start calculation
The value should be always 3, as it follows from the specification.

Fix a stack buffer overflow in exponents_from_scale_factors as reported
by asan. Thanks to Dale Curtis for the sample vector.
2012-09-28 16:02:39 +02:00
Michael Niedermayer ac7d0c79c3 mp3dec: ask for 8khz switch point mp3s
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 04:39:10 +02:00
Michael Niedermayer 94041febc5 mp3dec: Fix possibly exploitable crash
I was sadly unable to find a non fuzzed mp3 that uses the
feature that contained the bug (and i searched hard ...), thus
while this fixes the security issue. It may or may not fix
mixed blocks in 8khz mp3s, i cant say due to lack of samples to test.

Security issue exists since: b37d945dd4

Reported-by: Dale Curtis <dalecurtis@google.com>
(Probably) Found-by: inferno@chromium.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 01:45:53 +02:00
Michael Niedermayer 76fac07334 mpegaudiodec: replace pow(2.0,...) by exp2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-10 22:34:18 +02:00
Michael Niedermayer 11a1033c9f Merge remote-tracking branch 'qatar/master'
* qatar/master: (23 commits)
  build: cosmetics: Reorder some lists in a more logical fashion
  x86: pngdsp: Fix assembly for OS/2
  fate: add test for RTjpeg in nuv with frameheader
  rtmp: send check_bw as notification
  g723_1: clip argument for 15-bit version of normalize_bits()
  g723_1: use all LPC vectors in formant postfilter
  id3v2: Support v2.2 PIC
  avplay: fix build with lavfi disabled.
  avconv: split configuring filter configuration to a separate file.
  avconv: split option parsing into a separate file.
  mpc8: do not leave padding after last frame in buffer for the next decode call
  mpegaudioenc: list supported channel layouts.
  mpegaudiodec: don't print an error on > 1 frame in a packet.
  api-example: update to new audio encoding API.
  configure: add --enable/disable-random option
  doc: cygwin: Update list of FATE package requirements
  build: Remove all installed headers and header directories on uninstall
  build: change checkheaders to use regular build rules
  rtmp: Add a new option 'rtmp_subscribe'
  rtmp: Add support for subscribing live streams
  ...

Conflicts:
	Makefile
	common.mak
	configure
	doc/examples/decoding_encoding.c
	ffmpeg.c
	libavcodec/g723_1.c
	libavcodec/mpegaudiodec.c
	libavcodec/x86/pngdsp.asm
	libavformat/version.h
	library.mak
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-09 00:51:02 +02:00
Anton Khirnov 927e92cdc7 mpegaudiodec: don't print an error on > 1 frame in a packet.
It's a perfectly normal situation, nothing to spam about.
2012-08-08 07:53:48 +02:00
Michael Niedermayer 7a72695c05 Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85':
  Replace all CODEC_ID_* with AV_CODEC_ID_*
  lavc: add AV prefix to codec ids.

Conflicts:
	doc/APIchanges
	doc/examples/decoding_encoding.c
	doc/examples/muxing.c
	ffmpeg.c
	ffprobe.c
	ffserver.c
	libavcodec/8svx.c
	libavcodec/avcodec.h
	libavcodec/dnxhd_parser.c
	libavcodec/dvdsubdec.c
	libavcodec/error_resilience.c
	libavcodec/h263dec.c
	libavcodec/libvorbisenc.c
	libavcodec/mjpeg_parser.c
	libavcodec/mjpegenc.c
	libavcodec/mpeg12.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pcm.c
	libavcodec/r210dec.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/version.h
	libavdevice/alsa-audio-dec.c
	libavdevice/bktr.c
	libavdevice/v4l2.c
	libavformat/asfdec.c
	libavformat/asfenc.c
	libavformat/avformat.h
	libavformat/avidec.c
	libavformat/caf.c
	libavformat/electronicarts.c
	libavformat/flacdec.c
	libavformat/flvdec.c
	libavformat/flvenc.c
	libavformat/framecrcenc.c
	libavformat/img2.c
	libavformat/img2dec.c
	libavformat/img2enc.c
	libavformat/ipmovie.c
	libavformat/isom.c
	libavformat/matroska.c
	libavformat/matroskadec.c
	libavformat/matroskaenc.c
	libavformat/mov.c
	libavformat/movenc.c
	libavformat/mp3dec.c
	libavformat/mpeg.c
	libavformat/mpegts.c
	libavformat/mxf.c
	libavformat/mxfdec.c
	libavformat/mxfenc.c
	libavformat/nsvdec.c
	libavformat/nut.c
	libavformat/oggenc.c
	libavformat/pmpdec.c
	libavformat/rawdec.c
	libavformat/rawenc.c
	libavformat/riff.c
	libavformat/sdp.c
	libavformat/utils.c
	libavformat/vocenc.c
	libavformat/wtv.c
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 22:45:46 +02:00
Anton Khirnov 36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Michael Niedermayer 29d1df66ad mpegaudiodec: replace assert() by check under #ifdef DEBUG
The assert can be false with some invalid inputs, the check is
too expensive to always do though for just a warning message.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-07 04:45:06 +02:00
Michael Niedermayer a2f91e7bcd mpegaudiodec: switch to av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-28 05:31:27 +02:00
Nedeljko Babic 6d74e3c6f2 Optimization of MP3 decoders for MIPS
MP3 fixed and floating point decoders are optimized
 for MIPS architecture.

Signed-off-by: Nedeljko Babic <nbabic@mips.com>
Reviewed-by: Vitor Sessak <vitor1001@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-05 12:24:03 +02:00
Michael Niedermayer 349c62410b Merge remote-tracking branch 'qatar/master'
* qatar/master:
  indeo: Make ivi_calc_band_checksum() static, it is only used in one file.
  indeo: Drop unused debug function ivi_check_band().
  avcodec/utils: cast a function argument to shut up a compiler warning
  truemotion1: remove disabled code
  fix typo in comment
  fate: fix dependencies for non-SAMPLES avconv tests
  indeo: check for invalid motion vectors
  indeo: check that band output buffer exists
  indeo: clear allocated band buffers
  indeo: track tile macroblock size
  indeo: check custom Huffman tables for errors
  factor out common decoding code for Indeo 4 and Indeo 5
  mp3: fix start band index for block type 2 in 8kHz audio
  lavf: change some (de)muxer names to lowercase
  lavf: make output format matching case insensitive

Conflicts:
	libavcodec/indeo4.c
	libavcodec/indeo5.c
	libavcodec/ivi_common.c
	libavcodec/utils.c
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-20 22:58:04 +02:00
Kostya Shishkov b37d945dd4 mp3: fix start band index for block type 2 in 8kHz audio
In hybrid frames long window part ends at 36 samples for most of the cases
but at 72 for 8kHz case. For some reason decoder assumed it's 48 or even 36
samples, which caused wrong bitstream decoding for such blocks.

l3_25207.mpg from conformance suite demonstrates it the best.
2012-05-20 10:53:21 +02:00
Michael Niedermayer c5371f775c mpegaudidec: 10l forgot buf_size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 22:22:45 +02:00
Michael Niedermayer 43bc5cf9f4 mpegaudiodec: skip initial zeros.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-19 22:15:21 +02:00
Michael Niedermayer 3183c38aaa mp3decoder: discard ID3 tags
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-05-08 03:13:37 +02:00
Michael Niedermayer e366e6bfab Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ppc: drop unused function dct_quantize_altivec()
  mpegaudiodec: Do not discard mp_decode_frame() return value.
  matroska: do not set invalid default duration if frame rate is zero
  mkv: use av_reduce instead of av_d2q for framerate estimation
  mkv: report average framerate as minimal as well
  avcodec_string: Favor AVCodecContext.codec over the default codec.
  cook: Make constants passed to AV_BE2NE32C() unsigned to avoid signed overflow.

Conflicts:
	libavcodec/cook.c
	libavcodec/ppc/mpegvideo_altivec.c
	libavcodec/utils.c
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-18 22:08:28 +02:00
Diego Biurrun aa3f2cb584 mpegaudiodec: Do not discard mp_decode_frame() return value.
This fixes the warning:
libavcodec/mpegaudiodec.c:1704:14: warning: variable ‘out_size’ set but not used
2012-04-18 18:28:24 +02:00
Michael Niedermayer cca9528524 mp3on4: allocate a large enough frame.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-14 00:24:38 +02:00
Michael Niedermayer e2094bd03b mpeghaudiodec: Fix "set but not used" warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-30 20:17:58 +02:00
Michael Niedermayer 2b7c0c9fe1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mp3dec: perform I/S and M/S only when frame mode is joint stereo.
  id3v2: add another mimetype for JPEG image
  lzw: prevent buffer overreads.
  WMAL: Remove inaccurate and unnecessary doxy
  h264: fix cabac-on-stack after safe cabac reader.
  truemotion2: convert packet header reading to bytestream2.

Conflicts:
	libavcodec/lzw.c
	libavcodec/truemotion2.c
	libavformat/id3v2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-30 06:05:39 +02: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
Michael Niedermayer d40ff29cac Merge remote-tracking branch 'qatar/master'
* qatar/master:
  asf: only set index_read if the index contained entries.
  cabac: add overread protection to BRANCHLESS_GET_CABAC().
  cabac: increment jump locations by one in callers of BRANCHLESS_GET_CABAC().
  cabac: remove unused argument from BRANCHLESS_GET_CABAC_UPDATE().
  cabac: use struct+offset instead of memory operand in BRANCHLESS_GET_CABAC().
  h264: add overread protection to get_cabac_bypass_sign_x86().
  h264: reindent get_cabac_bypass_sign_x86().
  h264: use struct offsets in get_cabac_bypass_sign_x86().
  h264: fix overreads in cabac reader.
  wmall: fix seeking.
  lagarith: fix buffer overreads.
  dvdec: drop unnecessary dv_tablegen.h #include
  build: fix doc generation errors in parallel builds
  Replace memset(0) by zero initializations.
  faandct: Remove FAAN_POSTSCALE define and related code.
  dvenc: print allowed profiles if the video doesn't conform to any of them.
  avcodec_encode_{audio,video}: only reallocate output packet when it has non-zero size.
  FATE: add a test for vp8 with changing frame size.
  fate: add kgv1 fate test.
  oggdec: calculate correct timestamps in Ogg/FLAC

Conflicts:
	libavcodec/4xm.c
	libavcodec/cook.c
	libavcodec/dvdata.c
	libavcodec/dvdsubdec.c
	libavcodec/lagarith.c
	libavcodec/lagarithrac.c
	libavcodec/utils.c
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-29 04:11:10 +02: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
Michael Niedermayer 2af8f2cea6 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  cmdutils: use new avcodec_is_decoder/encoder() functions.
  lavc: make codec_is_decoder/encoder() public.
  lavc: deprecate AVCodecContext.sub_id.
  libcdio: add a forgotten AVClass to the private context.
  swscale: remove "cpu flags" from -sws_flags description.
  proresenc: give user a possibility to alter some encoding parameters
  vorbisenc: add output buffer overwrite protection
  libopencore-amrnbenc: fix end-of-stream handling
  ra144enc: fix end-of-stream handling
  nellymoserenc: zero any leftover packet bytes
  nellymoserenc: use proper MDCT overlap delay
  qpeg: Use bytestream2 functions to prevent buffer overreads.
  swscale: make %rep unconditional.
  vp8: convert simple loopfilter x86 assembly to use named arguments.
  vp8: convert idct x86 assembly to use named arguments.
  vp8: convert mc x86 assembly to use named arguments.
  vp8: convert loopfilter x86 assembly to use cpuflags().
  vp8: convert idct/mc x86 assembly to use cpuflags().
  swscale: remove now unnecessary hack.
  x86inc: don't "bake" stack_offset in named arguments.
  ...

Conflicts:
	cmdutils.c
	doc/APIchanges
	libavcodec/mpeg12.c
	libavcodec/options.c
	libavcodec/qpeg.c
	libavcodec/utils.c
	libavcodec/version.h
	libavdevice/libcdio.c
	tests/lavf-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-05 00:15:55 +01:00
Anton Khirnov 02beb9826b lavc: deprecate AVCodecContext.sub_id.
In most places where it's used, it's as a pointless write-only field.

Only rv10 decoder actually reads from it, but it stores some internal
version info in it. There is no reason for it to be in a public field.
2012-03-04 21:02:45 +01:00
Michael Niedermayer 8263212e86 mpegaudiodec: Enable checked bitstream reader.
It appears there are corner cases with damaged input that can lead
to small overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-01 06:39:48 +01:00
Michael Niedermayer a057ef6923 mpegaudiodec: change granule skip code to avoid false checked bitstream reader errors.
Code ported from qatar/master, please see there for per line authorship.
Main authors AFAIK are Ronald and Justin. I have no authorship on this.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-01 06:35:55 +01:00
Michael Niedermayer 79ae084e9b Merge remote-tracking branch 'qatar/master'
* qatar/master: (58 commits)
  amrnbdec: check frame size before decoding.
  cscd: use negative error values to indicate decode_init() failures.
  h264: prevent overreads in intra PCM decoding.
  FATE: do not decode audio in the nuv test.
  dxa: set audio stream time base using the sample rate
  psx-str: do not allow seeking by bytes
  asfdec: Do not set AVCodecContext.frame_size
  vqf: set packet parameters after av_new_packet()
  mpegaudiodec: use DSPUtil.butterflies_float().
  FATE: add mp3 test for sample that exhibited false overreads
  fate: add cdxl test for bit line plane arrangement
  vmnc: return error on decode_init() failure.
  libvorbis: add/update error messages
  libvorbis: use AVFifoBuffer for output packet buffer
  libvorbis: remove unneeded e_o_s check
  libvorbis: check return values for functions that can return errors
  libvorbis: use float input instead of s16
  libvorbis: do not flush libvorbis analysis if dsp state was not initialized
  libvorbis: use VBR by default, with default quality of 3
  libvorbis: fix use of minrate/maxrate AVOptions
  ...

Conflicts:
	Changelog
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/dpxenc.c
	libavcodec/libvorbis.c
	libavcodec/vmnc.c
	libavformat/asfdec.c
	libavformat/id3v2enc.c
	libavformat/internal.h
	libavformat/mp3enc.c
	libavformat/utils.c
	libavformat/version.h
	libswscale/utils.c
	tests/fate/video.mak
	tests/ref/fate/nuv
	tests/ref/fate/prores-alpha
	tests/ref/lavf/ffm
	tests/ref/vsynth1/prores
	tests/ref/vsynth2/prores

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-01 03:17:11 +01:00
Vitor Sessak 9b4cd58611 mpegaudiodec: use DSPUtil.butterflies_float().
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-29 12:12:50 -08:00
Michael Niedermayer 8e03912133 mpegaudiodec: dont memcpy() more than needed.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-25 06:47:57 +01:00
Michael Niedermayer b008ac18bb Merge remote-tracking branch 'qatar/master'
* qatar/master:
  docs: use -bsf:[vas] instead of -[vas]bsf.
  mpegaudiodec: Prevent premature clipping of mp3 input buffer.
  lavf: move the packet keyframe setting code.
  oggenc: free comment header for all codecs
  lcl: error out if uncompressed input buffer is smaller than framesize.
  mjpeg: abort decoding if packet is too large.
  golomb: use HAVE_BITS_REMAINING() macro to prevent infloop on EOF.
  get_bits: add HAVE_BITS_REMAINING macro.
  lavf/output-example: use new audio encoding API correctly.
  lavf/output-example: more proper usage of the new API.
  tiff: Prevent overreads in the type_sizes array.
  tiff: Make the TIFF_LONG and TIFF_SHORT types unsigned.
  apetag: do not leak memory if avio_read() fails
  apetag: propagate errors.
  SBR DSP x86: implement SSE sbr_hf_g_filt
  SBR DSP x86: implement SSE sbr_sum_square_sse
  SBR DSP: use intptr_t for the ixh parameter.

Conflicts:
	doc/bitstream_filters.texi
	doc/examples/muxing.c
	doc/ffmpeg.texi
	libavcodec/golomb.h
	libavcodec/x86/Makefile
	libavformat/oggenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-25 04:00:43 +01:00
Dale Curtis b716542691 mpegaudiodec: Prevent premature clipping of mp3 input buffer.
Instead of clipping extrasize based on EXTRABYTES, clip based on the
amount of buffer actually left. Without this fix, there are warbles
and other distortions in the test case below.

http://kevincennis.com/mix/assets/sounds/1901_voxfx.mp3
2012-02-24 13:47:04 -05:00
Michael Niedermayer 4a519b6e03 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mov: Use defines for sample flags in fragments
  mov: Use defines for trun flags
  mov: Use defines for tfhd flags
  proresenc: force bitrate not to exceed given limit
  vc1parse: call vc1_init_common().
  wma: don't return 0 on invalid packets.
  asf: prevent packet_size_left from going negative if hdrlen > pktlen.
  mjpegb: don't return 0 at the end of frame decoding.
  rtpdec: Identify incorrectly signalled H263
  vp8dsp: split long line.
  aiff: don't skip block_align==0 check on COMM-after-SSND files.
  dpcm: ignore extra unpaired bytes in stereo streams.
  mp3on4: require a minimum framesize.
  mpc7: assign an error level + context to av_log() msg.
  huffyuv: error out on bit overrun.
  dct-test: Add the missing ff_ prefix to the altivec functions
  dct-test: Remove a stray declaration of a nonexistent function
  movenc: Write the unknown duration as 64 bit fields in ismv
  movenc: Write track durations with all bits set if duration is unknown

Conflicts:
	libavcodec/dct-test.c
	libavcodec/wmadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-19 01:47:10 +01:00
Ronald S. Bultje 3e13005cac mp3on4: require a minimum framesize.
If bufsize < headersize, init_get_bits() will be called with a negative
number, causing it to fail and any subsequent call to get_bits() will
crash because it reads from a NULL pointer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-17 15:32:23 -08:00
Michael Niedermayer 861aa9e7c2 mpegaudiodec: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-05 01:34:59 +01:00
Michael Niedermayer a369a6b858 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  fate: add golomb-test
  golomb-test: K&R formatting cosmetics
  h264: Split h264-test off into a separate file - golomb-test.c.
  h264-test: cleanup: drop timer invocations, commented out code and other cruft
  h264-test: Remove unused DSP and AVCodec contexts and related init calls.
  adpcm: Add missing stdint.h #include to fix standalone header compilation.
  lavf: add functions for accessing the fourcc<->CodecID mapping tables.
  lavc: set AVCodecContext.codec in avcodec_get_context_defaults3().
  lavc: make avcodec_close() work properly on unopened codecs.
  lavc: add avcodec_is_open().
  lavf: rename AVInputFormat.value to raw_codec_id.
  lavf: remove the pointless value field from flv and iv8
  lavc/lavf: remove unnecessary symbols from the symbol version script.
  lavc: reorder AVCodec fields.
  lavf: reorder AVInput/OutputFormat fields.
  mp3dec: Fix a heap-buffer-overflow
  adpcmenc: remove some unneeded casts
  adpcmenc: use int16_t and uint8_t instead of short and unsigned char.
  adpcmenc: fix adpcm_ms extradata allocation
  adpcmenc: return proper AVERROR codes instead of -1
  ...

Conflicts:
	doc/APIchanges
	libavcodec/Makefile
	libavcodec/adpcmenc.c
	libavcodec/avcodec.h
	libavcodec/h264.c
	libavcodec/libavcodec.v
	libavcodec/mpc7.c
	libavcodec/mpegaudiodec.c
	libavcodec/options.c
	libavformat/Makefile
	libavformat/avformat.h
	libavformat/flvdec.c
	libavformat/libavformat.v

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-01 02:36:09 +01:00
Alex Converse f372ce119b mp3dec: Fix a heap-buffer-overflow
In some cases, what is left to read from ptr is smaller than EXTRABYTES.

Based on a patch by Thierry Foucu <tfoucu@gmail.com>.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-30 16:49:15 -08:00
Michael Niedermayer e37f161e66 Merge remote-tracking branch 'qatar/master'
* qatar/master: (71 commits)
  movenc: Allow writing to a non-seekable output if using empty moov
  movenc: Support adding isml (smooth streaming live) metadata
  libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set
  sunrast: Document the different Sun Raster file format types.
  sunrast: Add a check for experimental type.
  libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat
  lavf: remove disabled FF_API_SET_PTS_INFO cruft
  lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft
  lavf: remove disabled FF_API_REORDER_PRIVATE cruft
  lavf: remove disabled FF_API_SEEK_PUBLIC cruft
  lavf: remove disabled FF_API_STREAM_COPY cruft
  lavf: remove disabled FF_API_PRELOAD cruft
  lavf: remove disabled FF_API_NEW_STREAM cruft
  lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft
  lavf: remove disabled FF_API_MUXRATE cruft
  lavf: remove disabled FF_API_FILESIZE cruft
  lavf: remove disabled FF_API_TIMESTAMP cruft
  lavf: remove disabled FF_API_LOOP_OUTPUT cruft
  lavf: remove disabled FF_API_LOOP_INPUT cruft
  lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft
  ...

Conflicts:
	doc/APIchanges
	libavcodec/8bps.c
	libavcodec/avcodec.h
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/options.c
	libavcodec/sunrast.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/x86/h264_deblock.asm
	libavdevice/libdc1394.c
	libavdevice/v4l2.c
	libavformat/avformat.h
	libavformat/avio.c
	libavformat/avio.h
	libavformat/aviobuf.c
	libavformat/dv.c
	libavformat/mov.c
	libavformat/utils.c
	libavformat/version.h
	libavformat/wtv.c
	libavutil/Makefile
	libavutil/file.c
	libswscale/x86/input.asm
	libswscale/x86/swscale_mmx.c
	libswscale/x86/swscale_template.c
	tests/ref/lavf/ffm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-28 07:53:34 +01:00