1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-31 16:31:54 +02:00
Commit Graph

80 Commits

Author SHA1 Message Date
Michael Niedermayer
c9fe864472 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vorbisdec: remove some pointless comments
  avprobe: add const to AVCodec pointer
  libavformat: add const to AVCodec pointers
  pthread: add const to AVCodec pointers

Conflicts:
	ffprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-19 14:55:58 +02:00
Mans Rullgard
4855022aa1 vorbisdec: remove some pointless comments
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-19 12:59:58 +01: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
8cac86e091 vorbisdec: fix heap buffer overflow.
Found-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-02 12:22:19 +02:00
Michael Niedermayer
5f298c6791 vorbisdec: switch to av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-11 23:26:55 +02:00
Michael Niedermayer
82edf6727f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lavr: add x86-optimized functions for mixing 1-to-2 s16p with flt coeffs
  lavr: add x86-optimized functions for mixing 1-to-2 fltp with flt coeffs
  Add Dolby/DPLII downmix support to libavresample
  vorbisdec: replace div/mod in loop with a counter
  fate: vorbis: add 5.1 surround test
  rtpenc: Allow requesting H264 RTP packetization mode 0
  configure: Sort the library listings in the help text alphabetically
  dwt: remove variable-length arrays
  RTMPT protocol support
  http: Properly handle chunked transfer-encoding for replies to post data
  http: Fail reading if the connection has gone away
  amr: Mark an array const
  amr: More space cleanup
  rtpenc: Fix memory leaks in the muxer open function

Conflicts:
	Changelog
	configure
	doc/APIchanges
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-18 20:07:00 +02:00
Mans Rullgard
9fcda25e35 vorbisdec: replace div/mod in loop with a counter
2x speedup of surround decoding on Cortex-A9.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-18 11:47:08 +01:00
Michael Niedermayer
7e22514d98 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  float_dsp: ppc: add a separate header for Altivec function prototypes
  ARM: fix float_dsp breakage from d5a7229
  Add a float DSP framework to libavutil
  PPC: Move types_altivec.h and util_altivec.h from libavcodec to libavutil
  ARM: Move asm.S from libavcodec to libavutil
  vc1dsp: mark put/avg_vc1_mspel_mc() always_inline

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-08 23:59:09 +02:00
Justin Ruggles
d5a7229ba4 Add a float DSP framework to libavutil
Move vector_fmul() from DSPContext to AVFloatDSPContext.
2012-06-08 13:14:38 -04:00
Michael Niedermayer
ad60b3b181 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vorbis: Validate that the floor 1 X values contain no duplicates.
  avprobe: Identify codec probe failures rather than calling them unsupported codecs.
  avformat: Probe codecs at score 0 on buffer exhaustion conditions.
  avformat: Factorize codec probing.
  Indeo Audio decoder
  imc: make IMDCT support stereo output
  imc: move channel-specific data into separate context
  lavfi: remove request/poll and drawing functions from public API on next bump
  lavfi: make avfilter_insert_pad and pals private on next bump.
  lavfi: make formats API private on next bump.
  avplay: use buffersrc instead of custom input filter.
  avtools: move buffer management code from avconv to cmdutils.
  avconv: don't use InputStream in the buffer management code.
  avconv: fix exiting when max frames is reached.
  mpc8: fix maximum bands handling
  aacdec: Turn PS off when switching to stereo and turn it to implicit when switching to mono.

Conflicts:
	Changelog
	cmdutils.h
	ffmpeg.c
	ffplay.c
	ffprobe.c
	libavcodec/avcodec.h
	libavcodec/mpc8.c
	libavcodec/v210dec.h
	libavcodec/version.h
	libavcodec/vorbisdec.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/formats.c
	libavfilter/src_movie.c
	libavfilter/vf_aspect.c
	libavfilter/vf_blackframe.c
	libavfilter/vf_boxblur.c
	libavfilter/vf_crop.c
	libavfilter/vf_cropdetect.c
	libavfilter/vf_delogo.c
	libavfilter/vf_drawbox.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_fifo.c
	libavfilter/vf_format.c
	libavfilter/vf_frei0r.c
	libavfilter/vf_gradfun.c
	libavfilter/vf_hflip.c
	libavfilter/vf_hqdn3d.c
	libavfilter/vf_libopencv.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_select.c
	libavfilter/vf_showinfo.c
	libavfilter/vf_transpose.c
	libavfilter/vf_unsharp.c
	libavfilter/vf_yadif.c
	libavfilter/vsrc_color.c
	libavfilter/vsrc_testsrc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-06-06 01:08:33 +02:00
Alex Converse
ecf79c4d3e vorbis: Validate that the floor 1 X values contain no duplicates.
Duplicate values in this vector are explicitly banned by the Vorbis I spec
and cause divide-by-zero crashes later on.
2012-06-05 09:51:51 -07:00
Reimar Döffinger
4561feb4bf vorbisdec: use correct channels variable.
All code should use the local variable, the
AVCodecContext might not yet have the updated value.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-04-12 20:32:08 +02:00
Michael Niedermayer
6101e5322f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec_asf: Set the no_resync_search option for the chained asf demuxer
  asfdec: Add an option for not searching for the packet markers
  cosmetics: Clean up the tiffenc pix_fmts declaration to match the style of others
  cosmetics: Align codec declarations
  cosmetics: Convert mimic.c to utf-8
  avconv: remove an unused function parameter.
  avconv: remove now pointless variables.
  avconv: drop support for building without libavfilter.
  nellymoserenc: fix crash due to memsetting the wrong area.
  libavformat: Only require first packet to be known for audio/video streams
  avplay: Don't try to scale timestamps if the tb isn't set

Conflicts:
	Changelog
	configure
	ffmpeg.c
	libavcodec/aacenc.c
	libavcodec/bmpenc.c
	libavcodec/dnxhddec.c
	libavcodec/dnxhdenc.c
	libavcodec/ffv1.c
	libavcodec/flacenc.c
	libavcodec/fraps.c
	libavcodec/huffyuv.c
	libavcodec/libopenjpegdec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videodec.c
	libavcodec/pamenc.c
	libavcodec/pgssubdec.c
	libavcodec/pngenc.c
	libavcodec/qtrleenc.c
	libavcodec/rawdec.c
	libavcodec/sgienc.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.c
	libavcodec/wmv2dec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-04-07 22:41:37 +02:00
Martin Storsjö
00c3b67b8a cosmetics: Align codec declarations
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 22:37:38 +03:00
Michael Niedermayer
a8cedbebf1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  ttadec: unbreak playback of matroska files
  vorbisdec: avoid invalid memory access
  Fix uninitialized reads on malformed ogg files.
  huffyuv: add padding to classic (v1) huffman tables.
  png: convert to bytestream2 API.
  dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2
  avs: fix infinite loop on end-of-stream.
  tiffdec: Prevent illegal memory access caused by recycled pointers.
  rtpenc: Fix the AVRational used for av_rescale_q_rnd
  wma: fix off-by-one in array bounds check.

Conflicts:
	libavcodec/huffyuv.c
	libavcodec/pngdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-09 01:22:31 +01:00
Aaron Colwell
12623a8026 vorbisdec: avoid invalid memory access
This fixes some invalid memory access caused later in the function
by res_chan[] not being set for all channels. This happens when a
channel doesn't appear a submap. This change simply returns a
decoder error when this situation is detected.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-08 11:52:33 -08:00
Michael Niedermayer
15c6be8c7d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  tiertexseq: set correct block_align for audio
  tiertexseq: set audio stream start time to 0
  voc/avs: Do not change the sample rate mid-stream.
  segafilm: use the sample rate as the time base for audio streams
  ea: fix audio pts
  psx-str: fix audio pts
  vqf: set packet duration
  tta demuxer: set packet duration
  mpegaudio_parser: do not ignore information from the first parsed frame
  mpegaudio_parser: be less picky about the start position
  thp: set audio packet durations
  avcodec: add a Vorbis parser to get packet duration
  vorbisdec: read the previous window flag for long windows
  lavc: free the output packet when encoding failed or produced no output.
  lavc: preserve avpkt->destruct in ff_alloc_packet().
  lavc: clarify the meaning of AVCodecContext.frame_number.
  mpegts: Pad the packet buffer in handle_packet().
  mpegts: Do not call read_sl_header() when no bytes remain in the buffer.

Conflicts:
	libavcodec/mpegaudio_parser.c
	libavcodec/version.h
	libavformat/mpegts.c
	tests/ref/fate/pva-demux

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-04 04:26:04 +01:00
Justin Ruggles
5602a464c9 avcodec: add a Vorbis parser to get packet duration
This also allows for removing some of the Vorbis-related hacks.
2012-03-03 16:43:11 -05:00
Justin Ruggles
737ca4482b vorbisdec: read the previous window flag for long windows
When reading sequentially, we are using the actual flag from the previous
frame, but when seeking we do not know what the previous window flag was, so
we need to read it from the bitstream.
2012-03-03 16:43:11 -05:00
Michael Niedermayer
305e4b35ea Merge remote-tracking branch 'qatar/master'
* qatar/master: (34 commits)
  mlp_parser: fix the channel mask value used for the top surround channel
  vorbisenc: check all allocations for failure
  roqaudioenc: return AVERROR codes instead of -1
  roqaudioenc: set correct bit rate
  roqaudioenc: use AVCodecContext.frame_size correctly.
  roqaudioenc: remove unneeded sample_fmt check
  ra144enc: use int16_t* for input samples rather than void*
  ra144enc: set AVCodecContext.coded_frame
  ra144enc: remove unneeded sample_fmt check
  nellymoserenc: set AVCodecContext.coded_frame
  nellymoserenc: improve error checking in encode_init()
  nellymoserenc: return AVERROR codes instead of -1
  libvorbis: improve error checking in oggvorbis_encode_init()
  mpegaudioenc: return AVERROR codes instead of -1
  libfaac: improve error checking and handling in Faac_encode_init()
  avutil: add AVERROR_UNKNOWN
  check for coded_frame allocation failure in several audio encoders
  audio encoders: do not set coded_frame->key_frame.
  g722enc: check for trellis data allocation error
  libspeexenc: export encoder delay through AVCodecContext.delay
  ...

Conflicts:
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/fraps.c
	libavcodec/kgv1dec.c
	libavcodec/libfaac.c
	libavcodec/libgsm.c
	libavcodec/libvorbis.c
	libavcodec/mlp_parser.c
	libavcodec/roqaudioenc.c
	libavcodec/vorbisenc.c
	libavutil/avutil.h
	libavutil/error.c
	libavutil/error.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-26 05:11:21 +01:00
Justin Ruggles
19adb0bc2d vorbisdec: add a flush() function
clear MDCT overlap buffer and reset previous window mode when seeking
2012-02-24 17:37:25 -05:00
Michael Niedermayer
6cb2085278 Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits)
  ppc: Add ff_ prefix to nonstatic symbols
  sh4: Add ff_ prefix to nonstatic symbols
  mpegvideo: Add ff_ prefix to nonstatic functions
  rtjpeg: Add ff_ prefix to nonstatic symbols
  rv: Add ff_ prefix to nonstatic symbols
  vp56: Add ff_ prefix to nonstatic symbols
  vorbis: Add ff_ prefix to nonstatic symbols
  msmpeg4: Add ff_ prefix to nonstatic symbols
  vc1: Add ff_ prefix to nonstatic symbols
  msmpeg4: Add ff_ prefixes to nonstatic symbols
  snow: Add ff_ prefix to nonstatic symbols
  mpeg12: Add ff_ prefix to nonstatic symbols
  mpeg4: Add ff_ prefixes to nonstatic symbols
  lagarith: Add ff_ prefix to lag_rac_init
  libavcodec: Add ff_ prefix to j_rev_dct*
  dsputil: Add ff_ prefix to inv_zigzag_direct16
  libavcodec: Prefix fdct_ifast, fdct_ifast248
  dsputil: Add ff_ prefix to the dsputil*_init* functions
  libavcodec: Add ff_ prefix to some nonstatic symbols
  vlc/rl: Add ff_ prefix to the nonstatic symbols
  ...

Conflicts:
	libavcodec/Makefile
	libavcodec/allcodecs.c
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h263.h
	libavcodec/h263dec.c
	libavcodec/h264.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/nuv.c
	libavcodec/ppc/dsputil_ppc.c
	libavcodec/proresdsp.c
	libavcodec/svq3.c
	libavcodec/version.h
	libavformat/dv.h
	libavformat/dvenc.c
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-16 01:34:37 +01:00
Martin Storsjö
27cfdc3e4f vorbis: Add ff_ prefix to nonstatic symbols
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:07:11 +02:00
Martin Storsjö
9cf0841ef3 dsputil: Add ff_ prefix to the dsputil*_init* functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:34 +02:00
Martin Storsjö
e96b4a53df vlc/rl: Add ff_ prefix to the nonstatic symbols
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:26 +02:00
Michael Niedermayer
d77294c5e4 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libx264: fix indentation.
  vorbis: fix overflows in floor1[] vector and inverse db table index.
  win64: add a XMM clobber test configure option.
  movdec: Parse the dvc1 atom
  ARM: ac3: fix ac3_bit_alloc_calc_bap_armv6
  swscale: K&R formatting cosmetics for Blackfin code
  frwu: lowercase the FRWU codec name
  movdec: fix dts generation in fragmented files
  fate: make acodec-ac3_fixed test output raw AC3
  APIchanges: add missing commit hashes
  swscale: implement MMX, SSE2 and AVX functions for RGB32 input.
  ra144enc: drop pointless "encoder" from .long_name
  bethsoftvideo: fix palette reading.
  mpc7: use av_fast_padded_malloc()
  mpc7: simplify handling of packet sizes that are not a multiple of 4 bytes
  doc: decoding Forward Uncompressed is supported
  Fix a typo in the x86 asm version of ff_vector_clip_int32()
  pcmenc: Do not set avpkt->size.
  ff_alloc_packet: modify the size of the packet to match the requested size

Conflicts:
	doc/APIchanges
	libavcodec/libx264.c
	libavcodec/mpc7.c
	libavformat/isom.h
	libswscale/Makefile
	libswscale/bfin/yuv2rgb_bfin.c
	tests/ref/fate/bethsoft-vid
	tests/ref/seek/ac3_ac3

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-02-03 03:51:32 +01:00
Ronald S. Bultje
24947d4988 vorbis: fix overflows in floor1[] vector and inverse db table index. 2012-02-02 12:05:08 -08:00
Michael Niedermayer
c065255bba Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aacenc: Fix LONG_START windowing.
  aacenc: Fix a bug where deinterleaved samples were stored in the wrong place.
  avplay: use the correct array size for stride.
  lavc: extend doxy for avcodec_alloc_context3().
  APIchanges: mention avcodec_alloc_context()/2/3
  avcodec_align_dimensions2: set only 4 linesizes, not AV_NUM_DATA_POINTERS.
  aacsbr: ARM NEON optimised sbrdsp functions
  aacsbr: align some arrays
  aacsbr: move some simdable loops to function pointers
  cosmetics: Remove extra newlines at EOF

Conflicts:
	libavcodec/utils.c
	libavfilter/formats.c
	libavutil/mem.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-29 00:34:59 +01:00
Alex Converse
7181c4edee cosmetics: Remove extra newlines at EOF 2012-01-27 17:19:09 -08:00
Michael Niedermayer
ebc9ff8e7d vorbisdec: Check that the x values of floor1 are unique.
This is required by the spec and fixes video-1frag.ogg.48.ogg. (FPE)

Based on the debuging work of Oana Stratulat and ubitux.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-16 03:30:27 +01:00
Chris Evans
afb2aa5379 vorbis: An additional defense in the Vorbis codec.
Fixes Bug: #190
Chromium Bug: #100543
Related to CVE-2011-3893

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-01-08 09:09:26 +01:00
Michael Niedermayer
757473831c Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  cabac: Move code only used within the CABAC test program into the test program.
  vp56: Drop unnecessary cabac.h #include.
  h264-test: Initialize AVCodecContext.av_class.
  build: Skip compiling network.h and rtsp.h if networking is not enabled.
  cosmetics: drop some pointless parentheses
  Disable annoying warning without changing behavior
  faq: Solutions for common problems with sample paths when running FATE.
  avcodec: attempt to clarify the CODEC_CAP_DELAY documentation
  avcodec: fix avcodec_encode_audio() documentation.
  FATE: xmv-demux test; exercise the XMV demuxer without decoding the perceptual codecs inside.
  vqf: recognize more metadata chunks
  FATE test: BMV demuxer and associated video and audio decoders.
  FATE: indeo4 video decoder test.
  FATE: update xxan-wc4 test to a sample with more code coverage.
  Change the recent h264_mp4toannexb bitstream filter test to output to an elementary stream rather than a program stream.
  g722enc: validate AVCodecContext.trellis
  g722enc: set frame_size, and also handle an odd number of input samples
  g722enc: split encoding into separate functions for trellis vs. no trellis
  mpegaudiodec: Use clearer pointer math
  tta: Fix returned error code at EOF
  ...

Conflicts:
	libavcodec/h264.c
	libavcodec/indeo3.c
	libavcodec/interplayvideo.c
	libavcodec/ivi_common.c
	libavcodec/libxvidff.c
	libavcodec/mpegvideo.c
	libavcodec/ppc/mpegvideo_altivec.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavfilter/vsrc_buffer.c
	libavformat/Makefile
	tests/fate/indeo.mak
	tests/ref/acodec/g722

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-08 03:34:22 +01:00
Reinhard Tartler
e6d527ff72 vorbisdec: Fix decoding bug with channel handling
Fixes Bug: #191
Chromium Bug: #101458
CVE-2011-3895

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-01-07 23:16:52 +01:00
Diego Biurrun
3dc99a18d4 cosmetics: drop some pointless parentheses 2012-01-07 22:13:07 +01:00
Michael Niedermayer
ff7f198d7f vorbis: make sure ch is non zero before calling vorbis_residue_decode
This possibly makes part of the CVE-2011-3895 fix unneeded.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 21:58:08 +01:00
Chris Evans
f74ce3a60d vorbis: An additional defense in the Vorbis codec.
BUG=101458
Review URL: http://codereview.chromium.org/8414025

Fixes second part of CVE-2011-3895

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 21:58:08 +01:00
Chris Evans
68226ed9ec vorbis: Fix decoder bug.
BUG=101458
Review URL: http://codereview.chromium.org/8413019

This fixes part of 2011-3895

bigned-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 21:58:08 +01:00
Michael Niedermayer
405e99bdfd vorbisdec: Make sure blocksize is not set to an invalid value.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 21:58:08 +01:00
Michael Niedermayer
d1c28e3530 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  build: fix standalone compilation of OMA muxer
  build: fix standalone compilation of Microsoft XMV demuxer
  build: fix standalone compilation of Core Audio Format demuxer
  kvmc: fix invalid reads
  4xm: Add a check in decode_i_frame to prevent buffer overreads
  adpcm: fix IMA SMJPEG decoding
  options: set minimum for "threads" to zero
  bsd: use number of logical CPUs as automatic thread count
  windows: use number of CPUs as automatic thread count
  linux: use number of CPUs as automatic thread count
  pthreads: reset active_thread_type when slice thread_init returrns early
  v410dec: include correct headers
  Drop ALT_ prefix from BITSTREAM_READER_LE name.
  lavfi: always build vsrc_buffer.
  ra144enc: zero the reflection coeffs if the filter is unstable
  sws: readd PAL8 to isPacked()
  mov: Don't stick the QuickTime field ordering atom in extradata.
  truespeech: fix invalid reads in truespeech_apply_twopoint_filter()

Conflicts:
	configure
	libavcodec/4xm.c
	libavcodec/avcodec.h
	libavfilter/Makefile
	libavfilter/allfilters.c
	libavformat/Makefile
	libswscale/swscale_internal.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-23 03:25:51 +01:00
Diego Biurrun
aaf47bcde7 Drop ALT_ prefix from BITSTREAM_READER_LE name.
The prefix is a historic remnant that probably meant "alternative".
Now that the A32 bitstream reader has been dropped it makes no sense anymore.
2011-12-22 16:51:23 +01:00
Michael Niedermayer
e4de71677f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  aac_latm: reconfigure decoder on audio specific config changes
  latmdec: fix audio specific config parsing
  Add avcodec_decode_audio4().
  avcodec: change number of plane pointers from 4 to 8 at next major bump.
  Update developers documentation with coding conventions.
  svq1dec: avoid undefined get_bits(0) call
  ARM: h264dsp_neon cosmetics
  ARM: make some NEON macros reusable
  Do not memcpy raw video frames when using null muxer
  fate: update asf seektest
  vp8: flush buffers on size changes.
  doc: improve general documentation for MacOSX
  asf: use packet dts as approximation of pts
  asf: do not call av_read_frame
  rtsp: Initialize the media_type_mask in the rtp guessing demuxer
  Cleaned up alacenc.c

Conflicts:
	doc/APIchanges
	doc/developer.texi
	libavcodec/8svx.c
	libavcodec/aacdec.c
	libavcodec/ac3dec.c
	libavcodec/avcodec.h
	libavcodec/nellymoserdec.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/version.h
	libavcodec/wmadec.c
	libavformat/asfdec.c
	tests/ref/seek/lavf_asf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-03 03:00:30 +01:00
Justin Ruggles
0eea212943 Add avcodec_decode_audio4().
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
2011-12-02 17:40:40 -05:00
Michael Niedermayer
6d91045d83 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  doc: update libavfilter documentation
  tls: Use the URLContext as logging context
  aes: Avoid illegal read and don't generate more key than we use.
  mpc7: Fix memset call in mpc7_decode_frame function
  atrac1: use correct context for av_log()
  apedec: consume the whole packet when copying to the decoder buffer.
  apedec: do not needlessly copy s->samples to nblocks.
  apedec: check output buffer size after calculating actual output size
  apedec: remove unneeded entropy decoder normalization.
  truespeech: use memmove() in truespeech_update_filters()
  vorbisdec: remove AVCODEC_MAX_AUDIO_FRAME_SIZE check
  vorbisdec: remove unneeded buf_size==0 check
  vorbisdec: return proper error codes instead of made-up ones
  http: Don't add a Range: bytes=0- header for POST
  sunrast: Check for invalid/corrupted bitstream
  http: Change the chunksize AVOption into chunked_post
  http: Add encoding/decoding flags to the AVOptions
  avconv: remove some codec-specific hacks
  crypto: add decoding flag to options.
  tls: use AVIO_FLAG_NONBLOCK instead of deprecated URL_FLAG_NONBLOCK
  ...

Conflicts:
	doc/libavfilter.texi
	libavcodec/atrac1.c
	libavcodec/sunrast.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-11 02:50:35 +01:00
Justin Ruggles
41899b9acb vorbisdec: remove AVCODEC_MAX_AUDIO_FRAME_SIZE check
The user could provide a larger buffer, which is already checked separately
before writing output.
2011-11-10 10:25:46 -05:00
Justin Ruggles
e551a6f49a vorbisdec: remove unneeded buf_size==0 check 2011-11-10 10:25:46 -05:00
Justin Ruggles
f666276fa6 vorbisdec: return proper error codes instead of made-up ones 2011-11-10 10:25:46 -05:00
Michael Niedermayer
2b0cdb7364 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Move id3v2 tag writing to a separate file.
  swscale: add missing colons to x86 assembly yuv2planeX.
  g722: split decoder and encoder into separate files
  cosmetics: remove extra spaces before end-of-statement semi-colons
  vorbisdec: check output buffer size before writing output
  wavpack: calculate bpp using av_get_bytes_per_sample()
  ac3enc: Set max value for mode options correctly
  lavc: move get_b_cbp() from h263.h to mpeg4videoenc.c
  mpeg12: move closed_gop from MpegEncContext to Mpeg1Context
  mpeg12: move full_pel from MpegEncContext to Mpeg1Context
  mpeg12: move Mpeg1Context from mpeg12.c to mpeg12.h
  mpegvideo: remove some unused variables from MpegEncContext.

Conflicts:
	libavcodec/mpeg12.c
	libavformat/mp3enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-24 01:01:21 +02:00
Justin Ruggles
b95fbba705 cosmetics: remove extra spaces before end-of-statement semi-colons 2011-10-23 11:36:56 -04:00
Justin Ruggles
60aa1a358d vorbisdec: check output buffer size before writing output 2011-10-23 11:36:56 -04:00