1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

165 Commits

Author SHA1 Message Date
James Almer
8acd73e348 avcodec/vorbisdec: add missing comma
Should fix compilation failures after 191b2d4fc9.

Found-by: philipl
2017-05-04 21:44:58 -03:00
James Almer
191b2d4fc9 Merge commit '0b77a5933635293508e7289e7cf191ed166cf070'
* commit '0b77a5933635293508e7289e7cf191ed166cf070':
  Use correct printf conversion specifiers for POSIX integer types

See 549045254c

Merged-by: James Almer <jamrial@gmail.com>
2017-05-04 21:21:16 -03:00
Clément Bœsch
549045254c Fix all -Wformat warnings raised by DJGPP 2017-03-29 14:49:29 +02:00
Diego Biurrun
0b77a59336 Use correct printf conversion specifiers for POSIX integer types 2016-12-23 19:30:00 +01:00
Clément Bœsch
ae753dbd0d Merge commit 'b668662939de3a02454cfc9ba3e6d10b87527a40'
* commit 'b668662939de3a02454cfc9ba3e6d10b87527a40':
  get_bits: Move BITSTREAM_READER_LE definition before all relevant #includes

The merge commit also includes changes for libavcodec/interplayacm.c and
libavcodec/truemotion2rt.c

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-29 11:35:10 +02:00
Diego Biurrun
b668662939 get_bits: Move BITSTREAM_READER_LE definition before all relevant #includes
This avoids the danger that get_bits.h might get indirectly #included before
BITSTREAM_READER_LE is defined.

Also sort headers into canonical order where appropriate.
2016-06-07 13:09:57 +02:00
Andreas Cadhalpun
e7a7b3135a vorbisdec: reject rangebits 0 with non-0 partitions
This causes non-unique elements in floor_setup->data.t1.list, which
makes the stream undecodable according to the specification.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-04 13:07:28 +01:00
Andreas Cadhalpun
b4b13848de vorbisdec: reject channel mapping with less than two channels
It causes the angle channel number to equal the magnitude channel
number, which makes the stream undecodable according to the
specification.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-03 23:44:47 +01:00
Paul B Mahol
81f7a2579b avcodec/vorbisdec: use init_get_bits8()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-09-03 09:12:14 +00:00
Michael Niedermayer
444e9874a7 Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
  lavc: AV-prefix all codec capabilities

Conflicts:
	cmdutils.c
	ffmpeg.c
	ffplay.c
	libavcodec/8svx.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/adpcm.c
	libavcodec/alac.c
	libavcodec/atrac3plusdec.c
	libavcodec/bink.c
	libavcodec/dnxhddec.c
	libavcodec/dvdec.c
	libavcodec/dvenc.c
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c
	libavcodec/fic.c
	libavcodec/flacdec.c
	libavcodec/flacenc.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/hevc.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libvo-aacenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxdec.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpegaudiodec_float.c
	libavcodec/msmpeg4dec.c
	libavcodec/mxpegdec.c
	libavcodec/nvenc_h264.c
	libavcodec/nvenc_hevc.c
	libavcodec/pngdec.c
	libavcodec/qpeg.c
	libavcodec/ra288.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tiff.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/vp9.c
	libavcodec/wavpack.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Michael Niedermayer
94d68a41fa Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
* commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615':
  lavc: AV-prefix all codec flags

Conflicts:
	doc/examples/muxing.c
	ffmpeg.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/aacdec.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/ac3enc_float.c
	libavcodec/atrac1.c
	libavcodec/atrac3.c
	libavcodec/atrac3plusdec.c
	libavcodec/dcadec.c
	libavcodec/ffv1enc.c
	libavcodec/h264.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_mb.c
	libavcodec/imc.c
	libavcodec/libmp3lame.c
	libavcodec/libtheoraenc.c
	libavcodec/libtwolame.c
	libavcodec/libvpxenc.c
	libavcodec/libxavs.c
	libavcodec/libxvid.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegaudiodec_template.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/nellymoserdec.c
	libavcodec/nellymoserenc.c
	libavcodec/nvenc.c
	libavcodec/on2avc.c
	libavcodec/options_table.h
	libavcodec/opus_celt.c
	libavcodec/pngenc.c
	libavcodec/ra288.c
	libavcodec/ratecontrol.c
	libavcodec/twinvq.c
	libavcodec/vc1_block.c
	libavcodec/vc1_loopfilter.c
	libavcodec/vc1_mc.c
	libavcodec/vc1dec.c
	libavcodec/vorbisdec.c
	libavcodec/vp3.c
	libavcodec/wma.c
	libavcodec/wmaprodec.c
	libavcodec/x86/hpeldsp_init.c
	libavcodec/x86/me_cmp_init.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:10:35 +02:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Vittorio Giovara
7c6eb0a1b7 lavc: AV-prefix all codec flags
Convert doxygen to multiline and express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Michael Niedermayer
8f7b022c8c Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'
* commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25':
  lavc: Replace av_dlog and tprintf with internal macros

Conflicts:
	libavcodec/aacdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/bitstream.c
	libavcodec/dcadec.c
	libavcodec/dnxhddec.c
	libavcodec/dvbsubdec.c
	libavcodec/dvdec.c
	libavcodec/dvdsubdec.c
	libavcodec/get_bits.h
	libavcodec/gifdec.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_refs.c
	libavcodec/imc.c
	libavcodec/interplayvideo.c
	libavcodec/jpeglsdec.c
	libavcodec/libopencore-amr.c
	libavcodec/mjpegdec.c
	libavcodec/mpeg12dec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_parser.c
	libavcodec/pngdec.c
	libavcodec/ratecontrol.c
	libavcodec/rv10.c
	libavcodec/svq1dec.c
	libavcodec/vqavideo.c
	libavcodec/wmadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:10:10 +02:00
Vittorio Giovara
6a85dfc830 lavc: Replace av_dlog and tprintf with internal macros 2015-04-19 12:41:59 +01:00
Michael Niedermayer
acfb54c076 Merge commit '0025f7408a0fab2cab4a950064e4784a67463994'
* commit '0025f7408a0fab2cab4a950064e4784a67463994':
  vorbis: Check the vlc value in setup_classifs

Conflicts:
	libavcodec/vorbisdec.c

See: ae038c0914
See: 709cae2bcb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 19:31:25 +01:00
Michael Niedermayer
10e3e3aa85 Merge commit '62de77ffcaebd42fe685b8426da56b89b2532318'
* commit '62de77ffcaebd42fe685b8426da56b89b2532318':
  vorbis: Use a local codebook variable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 18:59:06 +01:00
Luca Barbato
0025f7408a vorbis: Check the vlc value in setup_classifs
The valid returned values are always at most 11bit.
Remove the previous check that assumed larger values plausible and
use a signed integer to check get_vlc2 return values.

CC: libav-stable@libav.org
2015-03-08 14:33:03 +01:00
Luca Barbato
62de77ffca vorbis: Use a local codebook variable
Makes the code a little simpler.
2015-03-08 14:33:02 +01:00
Michael Niedermayer
e82b0e6126 Merge commit 'ee964145b5d229571e00bf6883a44189d02babe2'
* commit 'ee964145b5d229571e00bf6883a44189d02babe2':
  lavc: remove unused traces of fmtconvert usage

Conflicts:
	libavcodec/aac.h
	libavcodec/aacdec.c
	libavcodec/atrac3.c
	libavcodec/vorbisdec.c
	libavcodec/wma.c
	libavcodec/wma.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 23:41:36 +01:00
Anton Khirnov
ee964145b5 lavc: remove unused traces of fmtconvert usage
Those decoders have been switched to float output and so do not use
fmtconvert anymore.
2015-02-28 21:51:24 +01:00
Michael Niedermayer
2234a1cd16 avcodec/vorbisdec: Fix memleak, call cleanup on memory allocation failure
Fixes CID1258478, CID1258476, CID1258475
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 21:27:09 +01:00
Michael Niedermayer
7a7b77e6c9 Merge commit '31dc73e92a96f08d07650c0e7d31c0b9a1465d46'
* commit '31dc73e92a96f08d07650c0e7d31c0b9a1465d46':
  vorbisdec: Check memory allocations

Conflicts:
	libavcodec/vorbisdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-17 22:39:32 +01:00
Vittorio Giovara
31dc73e92a vorbisdec: Check memory allocations 2015-02-17 12:16:43 -05:00
Michael Niedermayer
a94eba6f0c Merge commit '7f9f771eac0d37a632e0ed9bd89961d57fcfb7e0'
* commit '7f9f771eac0d37a632e0ed9bd89961d57fcfb7e0':
  avcodec: Don't anonymously typedef structs

Conflicts:
	libavcodec/alac.c
	libavcodec/cinepak.c
	libavcodec/cscd.c
	libavcodec/dcadec.c
	libavcodec/g723_1.c
	libavcodec/gif.c
	libavcodec/iff.c
	libavcodec/kgv1dec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libspeexenc.c
	libavcodec/ra288.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-14 21:18:17 +01:00
Diego Biurrun
7f9f771eac avcodec: Don't anonymously typedef structs 2015-02-14 10:13:49 -08:00
Michael Niedermayer
ad2deb02e5 avcodec/xiph: mark returned header pointers const from avpriv_split_xiph_headers()
Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-14 14:30:45 +01:00
Michael Niedermayer
51f2422c2b avcodec/vorbisdec: Use avpriv_float_dsp_alloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-01 20:07:09 +01:00
Michael Niedermayer
b530e2e351 avcodec/vorbisdec: use av_freep(), do not leave stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-08 15:17:27 +02:00
Michael Niedermayer
8c50704ebf avcodec/vorbisdec: Fix off by 1 error in ptns_to_read
Fixes read of uninitialized memory
Fixes: asan_heap-uaf_18dac2b_9_asan_heap-uaf_22eb375_208_beta3_test_small.ogg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-04 03:13:39 +02:00
Michael Niedermayer
5a376976a0 avcodec/vorbisdec: Reset first_frame
This avoids returning a initial frame after seeking which does
not match what would be received when decoding from the begin.

Suggested-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-07 02:09:27 +02:00
Michael Niedermayer
f0c78b0769 avcodec/vorbisdec: use av_malloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-30 05:23:44 +02:00
Michael Niedermayer
0a266cb55a avcodec/vorbisdec: try to workaround libvorbisenc bug
Fixes Ticket3590

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-30 05:23:37 +02:00
Michael Niedermayer
5171ae781a avcodec/vorbisdec: use the stored previous window type only when the actual previous is not known
Fixes Ticket3432

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 20:45:29 +01:00
Michael Niedermayer
ee77140afa Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'
* commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2':
  cosmetics: Group .name and .long_name together in codec/format declarations

Conflicts:
	libavcodec/8svx.c
	libavcodec/alac.c
	libavcodec/cljr.c
	libavcodec/dnxhddec.c
	libavcodec/dnxhdenc.c
	libavcodec/dpxenc.c
	libavcodec/dvdec.c
	libavcodec/dvdsubdec.c
	libavcodec/dvdsubenc.c
	libavcodec/ffv1dec.c
	libavcodec/flacdec.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/g726.c
	libavcodec/gif.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/h263dec.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopencore-amr.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libspeexenc.c
	libavcodec/libvo-amrwbenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/libxavs.c
	libavcodec/libxvid.c
	libavcodec/ljpegenc.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg4videodec.c
	libavcodec/msmpeg4dec.c
	libavcodec/pgssubdec.c
	libavcodec/pngdec.c
	libavcodec/pngenc.c
	libavcodec/proresdec_lgpl.c
	libavcodec/proresenc_kostya.c
	libavcodec/ra144enc.c
	libavcodec/rawdec.c
	libavcodec/rv10.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tta.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/wavpack.c
	libavcodec/xbmenc.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 12:34:23 +02:00
Diego Biurrun
b2bed9325d cosmetics: Group .name and .long_name together in codec/format declarations 2013-10-03 23:32:01 +02:00
Michael Niedermayer
709cae2bcb vorbisdec: Check VLC tables during use instead of setup
Fixes regression and Ticket2720

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-01 02:09:29 +02:00
Michael Niedermayer
ae038c0914 vorbisdec: propagate errors from setup_classifs()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-01 02:08:50 +02:00
Michael Niedermayer
e2d4bcd7b8 Merge commit 'f8a4d5e970f32f8cc747f9fa7bd975ee4a060ea1'
* commit 'f8a4d5e970f32f8cc747f9fa7bd975ee4a060ea1':
  h264_parser: K&R formatting cosmetics
  vorbis: return meaningful errors

Conflicts:
	libavcodec/h264_parser.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-08 10:50:24 +02:00
Luca Barbato
92b3caa108 vorbis: return meaningful errors 2013-06-07 16:54:16 +02:00
Michael Niedermayer
c5e11e897a Merge commit 'db347280eb3746d7b70888db97f1efe5f06f5624'
* commit 'db347280eb3746d7b70888db97f1efe5f06f5624':
  vorbis: fallback to normal division instead of crashing

Conflicts:
	libavcodec/vorbisdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-20 12:02:18 +02:00
Michael Niedermayer
ed113d7a6b Merge commit 'ddf1b4a2f8a680126eb611428e4f47e6e5b8c6c0'
* commit 'ddf1b4a2f8a680126eb611428e4f47e6e5b8c6c0':
  vorbis: simplify the inner loop in setup_classifs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-20 11:42:03 +02:00
Michael Niedermayer
aef044d215 Merge commit '36f10380043c8b8c5cbf8c1add8695089cdaa341'
* commit '36f10380043c8b8c5cbf8c1add8695089cdaa341':
  vorbis: use normal integer values for iterators

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-20 11:28:21 +02:00
Michael Niedermayer
fbba76e89d Merge commit '98186578a2a21af5bfe6dd71d222dc270f763c7d'
* commit '98186578a2a21af5bfe6dd71d222dc270f763c7d':
  vorbis: refactor vorbis_residue_decode_internal

Conflicts:
	libavcodec/vorbisdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-20 10:58:43 +02:00
Luca Barbato
db347280eb vorbis: fallback to normal division instead of crashing
The use of ff_inverse speeds up slightly arches + compilers that
do not provide a division faster than the whole machinery, such
as ppc32 + gcc4.7, but has operational limits.

Drop the always-enable assert and provide a fallback.
2013-05-19 22:56:37 +02:00
Luca Barbato
ddf1b4a2f8 vorbis: simplify the inner loop in setup_classifs 2013-05-19 22:56:37 +02:00
Luca Barbato
36f1038004 vorbis: use normal integer values for iterators
No need to use fixed-size integers.
2013-05-19 22:56:37 +02:00
Luca Barbato
98186578a2 vorbis: refactor vorbis_residue_decode_internal 2013-05-19 22:56:37 +02:00
Michael Niedermayer
e6b6ae4695 vorbisdec: check codebook entry count
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-13 14:27:35 +02:00
Clément Bœsch
1ec94b0f06 lavc: factorize ff_{thread_,re,}get_buffer error messages.
Coccinelle profile used:

  @@
  expression r, ctx, f, loglevel, str, flags;
  @@

  -if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
  -    av_log(ctx, loglevel, str);
  -    return r;
  -}
  +if ((r = ff_get_buffer(ctx, f, flags)) < 0)
  +    return r;

  @@
  expression r, ctx, f, loglevel, str;
  @@

  -if ((r = ff_reget_buffer(ctx, f)) < 0) {
  -    av_log(ctx, loglevel, str);
  -    return r;
  -}
  +if ((r = ff_reget_buffer(ctx, f)) < 0)
  +    return r;

  @@
  expression r, ctx, f, loglevel, str, flags;
  @@

  -if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
  -    av_log(ctx, loglevel, str);
  -    return r;
  -}
  +if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
  +    return r;

...along with some manual patches for the remaining ones.
2013-03-13 19:00:10 +01:00