1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-25 21:51:29 +02:00
Commit Graph

95 Commits

Author SHA1 Message Date
Olivier Crête
521388edb7 avcodec/wma: Return specific error code
This way, the calling function can just forward it instead of
making it up.

Signed-off-by: Olivier Crête <olivier.crete@collabora.com>
2021-08-26 09:20:56 +02:00
Andreas Rheinhardt
cb8f01951b avcodec/wma: Check initializing VLC
Initializing a VLC entails implicit allocations which may fail.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-05-12 06:00:13 +02:00
Andreas Rheinhardt
0bc522a0a1 avcodec/wma: Remove nonsense volatile
The address of this variable never leaks, so it cannot be modified
by anyone else at all.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-05-12 06:00:13 +02:00
Andreas Rheinhardt
f1c022abf0 avcodec/wma: Remove unused array
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-23 10:37:04 +02:00
Carl Eugen Hoyos
724cf83f10 Remove some unneeded casts of bit_rate. 2017-09-22 01:33:22 +02:00
Clément Bœsch
18cdef9ab7 Merge commit 'a972fc1c0ab6e7f169f9145d6da46e8cedbc291c'
* commit 'a972fc1c0ab6e7f169f9145d6da46e8cedbc291c':
  wma: Kill non-compiling disabled cruft

See 0755033f8a

Merged-by: Clément Bœsch <u@pkh.me>
2017-03-19 15:42:55 +01:00
Diego Biurrun
a972fc1c0a wma: Kill non-compiling disabled cruft 2016-08-17 12:16:42 +02:00
Clément Bœsch
8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Vittorio Giovara
41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Diego Biurrun
0f40c90984 Drop pointless assert.h #includes 2016-05-03 15:45:10 +02:00
Michael Niedermayer
7404f3bdb9 lavc: Switch bitrate to 64bit unless compatibility with avconv was requested. 2015-09-15 18:02:43 +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
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
bd4c4c868c avcodec/wma: Fix undefined shift in ff_wma_run_level_decode()
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-11 15:27:54 +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
305cbe76d3 avcodec/wma: remove unneeded #includes, there are no assert() only av_assert*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-30 02:26:17 +01:00
Michael Niedermayer
365ef88d5d avcodec/wma: Print more details in case of spectral RLE overflows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-12 13:56:13 +01:00
Michael Niedermayer
8ccfafa7b4 Merge commit '596b5c488fa1d40f114a64d3b73e1863cab073fb'
* commit '596b5c488fa1d40f114a64d3b73e1863cab073fb':
  wma: check memory allocations and propagate errors

Conflicts:
	libavcodec/wma.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 05:36:20 +01:00
Vittorio Giovara
596b5c488f wma: check memory allocations and propagate errors 2014-12-18 23:27:14 +01:00
Michael Niedermayer
2fbb9e647c avcodec/wma: Use avpriv_float_dsp_alloc()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-30 11:19:29 +01:00
Michael Niedermayer
5a20f1885d Merge commit 'f20518568a77a6138fc74021ce56013ab72907ba'
* commit 'f20518568a77a6138fc74021ce56013ab72907ba':
  build: Split WMA frequencies into a separate object file

Conflicts:
	configure
	libavcodec/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-04 19:46:06 +02:00
Diego Biurrun
f20518568a build: Split WMA frequencies into a separate object file
These are the only WMA bits shared with binkaudio. Splitting them off
reduces the binnkaudio dependency on general WMA code.
2014-09-04 05:19:46 -07:00
Michael Niedermayer
75a9859ac6 Merge commit 'd2a4e4b9cc9a0c2661e1c1d6f6b51babac2cec1b'
* commit 'd2a4e4b9cc9a0c2661e1c1d6f6b51babac2cec1b':
  wma: K&R formatting cosmetics

Conflicts:
	libavcodec/wma.c
	libavcodec/wmadec.c
	libavcodec/wmaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-03 22:10:21 +02:00
Gabriel Dume
d2a4e4b9cc wma: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-03 03:09:08 -07:00
Michael Niedermayer
da621ffbcf avcodec/wma: use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-22 02:41:05 +02:00
Michael Niedermayer
d167faafe9 avcodec/wma: use av_freep(), do not leave stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-05 21:34:03 +02:00
Michael Niedermayer
46ad2d9e44 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  miscellaneous typo fixes

Conflicts:
	configure
	libavformat/avisynth.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-26 11:12:11 +02:00
Diego Biurrun
03039f4c8c miscellaneous typo fixes 2013-07-25 19:43:32 +02:00
Michael Niedermayer
0aa095483d Merge commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487'
* commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487':
  avcodec: Add av_cold attributes to init functions missing them

Conflicts:
	libavcodec/aacpsy.c
	libavcodec/atrac3.c
	libavcodec/dvdsubdec.c
	libavcodec/ffv1.c
	libavcodec/ffv1enc.c
	libavcodec/h261enc.c
	libavcodec/h264_parser.c
	libavcodec/h264dsp.c
	libavcodec/h264pred.c
	libavcodec/libschroedingerenc.c
	libavcodec/libxvid_rc.c
	libavcodec/mpeg12.c
	libavcodec/mpeg12enc.c
	libavcodec/proresdsp.c
	libavcodec/rangecoder.c
	libavcodec/videodsp.c
	libavcodec/x86/proresdsp_init.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 11:34:29 +02:00
Diego Biurrun
6fee1b90ce avcodec: Add av_cold attributes to init functions missing them 2013-05-04 21:09:45 +02:00
Michael Niedermayer
e052f06531 Merge commit '0f24a3ca999a702f83af9307f9f47b6fdeb546a5'
* commit '0f24a3ca999a702f83af9307f9f47b6fdeb546a5':
  lavc: remove disabled FF_API_OLD_ENCODE_VIDEO cruft
  lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft
  lavc: remove disabled FF_API_OLD_DECODE_AUDIO cruft

Conflicts:
	libavcodec/flacenc.c
	libavcodec/libgsm.c
	libavcodec/utils.c
	libavcodec/version.h

The compatibility wrapers are left as they likely sre still
in wide use. They will be removed when they break or otherwise
cause work without an volunteer being available.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-12 22:04:16 +01:00
Anton Khirnov
f073b1500e lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft 2013-03-09 08:36:40 +01:00
Michael Niedermayer
0dff771f31 Merge commit '205a95f7b5178362874bc1e65eae9866723491c1'
* commit '205a95f7b5178362874bc1e65eae9866723491c1':
  wmaenc: alloc/free coded_frame instead of keeping it in the WMACodecContext
  wma: decode directly to the user-provided AVFrame
  wmapro: decode directly to the user-provided AVFrame
  wavpack: decode directly to the user-provided AVFrame

Conflicts:
	libavcodec/wavpack.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-13 12:49:48 +01:00
Justin Ruggles
205a95f7b5 wmaenc: alloc/free coded_frame instead of keeping it in the WMACodecContext 2013-02-12 12:22:40 -05:00
Michael Niedermayer
984add64a4 wma: check byte_offset_bits
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-30 23:12:57 +01:00
Michael Niedermayer
24604ebaf8 Merge commit '5959bfaca396ecaf63a8123055f499688b79cae3'
* commit '5959bfaca396ecaf63a8123055f499688b79cae3':
  floatdsp: move butterflies_float from dsputil to avfloatdsp.

Conflicts:
	libavcodec/dsputil.c
	libavcodec/dsputil.h
	libavcodec/imc.c
	libavcodec/mpegaudiodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 14:13:54 +01:00
Ronald S. Bultje
5959bfaca3 floatdsp: move butterflies_float from dsputil to avfloatdsp.
This makes wmadec/enc, twinvq and mpegaudiodec (i.e. mp2/mp3)
independent of dsputil.
2013-01-22 11:55:42 -08:00
Michael Niedermayer
8551c6bec0 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  dv1394: Swap the min and max values of the 'standard' option
  rtpdec_vp8: Don't parse fields that aren't used
  lavc: add some AVPacket doxy.
  audiointerleave: deobfuscate a function call.
  rtpdec: factorize identical code used in several handlers
  a64: remove interleaved mode.
  doc: Point to the new location of the c99-to-c89 tool
  decode_audio3: initialize AVFrame
  ws-snd1: set channel layout
  wmavoice: set channel layout
  wmapro: use AVCodecContext.channels instead of keeping a private copy
  wma: do not keep private copies of some AVCodecContext fields

Conflicts:
	libavcodec/wmadec.c
	libavcodec/wmaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-02 14:57:36 +01:00
Justin Ruggles
2ed40608e9 wma: do not keep private copies of some AVCodecContext fields
channels, sample_rate, bit_rate, and block_align can be used directly from
the AVCodecContext
2012-11-01 11:29:19 -04:00
Michael Niedermayer
79d30321a2 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  wmaenc: use float planar sample format
  (e)ac3enc: use planar sample format
  aacenc: use planar sample format
  adpcmenc: use planar sample format for adpcm_ima_wav and adpcm_ima_qt
  adpcmenc: move 'ch' variable to higher scope
  adpcmenc: fix 3 instances of variable shadowing
  adpcm_ima_wav: simplify encoding
  libvorbis: use planar sample format
  libmp3lame: use planar sample formats
  vorbisenc: use float planar sample format
  ffm: do not write or read the audio sample format
  parseutils: fix parsing of invalid alpha values
  doc/RELEASE_NOTES: update for the 9 release.
  smoothstreamingenc: Add a more verbose error message
  smoothstreamingenc: Ignore the return value from mkdir
  smoothstreamingenc: Try writing a manifest when opening the muxer
  smoothstreamingenc: Move the output_chunk_list and write_manifest functions up
  smoothstreamingenc: Properly return errors from ism_flush to the caller
  smoothstreamingenc: Check the output UrlContext before accessing it

Conflicts:
	doc/RELEASE_NOTES
	libavcodec/aacenc.c
	libavcodec/ac3enc_template.c
	libavcodec/wmaenc.c
	tests/ref/lavf/ffm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-07 11:28:38 +02:00
Justin Ruggles
31b2262dca wmaenc: use float planar sample format 2012-10-06 13:23:13 -04: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
5eb353e0cd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  opt/eval: Include mathematics.h for NAN/INFINITY
  mathematics: Don't use division by zero in NAN/INFINITY macros
  wma: Lower the maximum number of channels to 2
  x86: cpu: clean up check for cpuid instruction support
  ARM: generate position independent code to access data symbols

Conflicts:
	libavutil/opt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-07-01 22:43:09 +02:00
Martin Storsjö
710bd8a33e wma: Lower the maximum number of channels to 2
ff_wma_init is used only by wmadec and wmaenc, and neither of them
can handle more than 2 channels.

This fixes crashes with invalid files.

Based on patch by Piotr Bandurski and Michael Niedermayer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-07-01 15:51:26 +03:00
Michael Niedermayer
bf807a5e87 Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  sbrdsp.asm: convert all instructions to float/SSE ones.
  dv: cosmetics.
  dv: check buffer size before reading profile.
  Revert "AAC SBR: group some writes."
  udp: Print an error message if bind fails
  cook: extend channel uncoupling tables so the full bit range is covered.
  roqvideo: cosmetics.
  roqvideo: convert to bytestream2 API.
  dca: don't use av_clip_uintp2().
  wmall: fix build with -DDEBUG enabled.
  smc: port to bytestream2 API.
  AAC SBR: group some writes.
  dsputil: remove shift parameter from scalarproduct_int16
  SBR DSP: unroll sum_square
  rv34: remove dead code in intra availability check
  rv34: clean a bit availability checks.
  v4l2: update documentation
  tgq: convert to bytestream2 API.
  parser: remove forward declaration of MpegEncContext
  dca: prevent accessing static arrays with invalid indexes.
  ...

Conflicts:
	doc/indevs.texi
	libavcodec/Makefile
	libavcodec/dca.c
	libavcodec/dvdata.c
	libavcodec/eatgq.c
	libavcodec/mmvideo.c
	libavcodec/roqvideodec.c
	libavcodec/smc.c
	libswscale/output.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-08 02:51:45 +01:00
Diego Biurrun
8ca6e523a6 wma: Refactor common code to fix standalone compilation of WMA lossless decoder. 2012-03-07 09:36:05 +01:00