Diego Biurrun
12e25ed284
avcodec: av_log_missing_feature(1) ---> avpriv_request_sample()
12 years ago
Diego Biurrun
63d744e2be
av_log_missing_feature() ---> avpriv_report_missing_feature()
12 years ago
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.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
James Almer
2e988fd689
lavc/tta: Use a safer check for encrypted streams
...
The user can provide a password even when the stream
is not encrypted, so check the value of s->format
instead of s->pass in ttafilter_init().
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Justin Ruggles
ad2104ba44
tta: decode directly to the user-provided AVFrame
12 years ago
James Almer
0957041221
lavc/tta: Add support for encrypted streams
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
056664ff25
lavc/tta: remove nonsense s->avctx indirection, use avctx directly
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Justin Ruggles
5778299c7e
ttadec: fix last frame handling when seeking
...
Using a frame count, as is done currently, does not work at all with
seeking. Instead, when the number of samples in the final frame has
been decoded, we check if only the 32-bit CRC is remaining. If so, we
assume that it is the final frame.
There is no longer a need to keep total_frames in TTAContext.
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Paul B Mahol
4ebf305951
lavc/tta: do not overwrite bits_per_coded_sample
...
It is supposed to be set in libavformat only.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
1ade37ae9c
lavc/tta: use meaningful error codes
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Diego Biurrun
717addecad
Use proper return values in case of missing features
12 years ago
Paul B Mahol
01c9ffa913
tta: let samples declaration match cast
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
12 years ago
Aneesh Dogra
46ea46357a
tta: Fix comment about channel number; TTA supports >2 channels.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Ronald S. Bultje
ac80b812cd
tta: prevents overflows for 32bit integers in header.
...
This prevents sample_rate/data_length from going negative, which
caused various crashes and undefined behaviour further down.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
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>
13 years ago
Michael Niedermayer
936951ca5c
tm2dec: check total_frames and extradata_size.
...
Fixes overread
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
15e07348fe
ttadec: refactor ttafilter_process()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
ea1d64ab10
ttadec: unbreak playback of matroska files
...
Matroska demuxer needs to recreate tta header, so just display
crc error without aborting.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Paul B Mahol
e04ca1d4ce
ttadec: cosmetics: reindent
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Justin Ruggles
f2a4559c77
ttadec: use branchless unsigned-to-signed unfolding
13 years ago
Paul B Mahol
323b9da969
ttadec: remove dead code
...
The unused code being removed is for encoding only and therefore is not needed
by the decoder.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Paul B Mahol
2af3dc8698
ttadec: CRC checking
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
Paul B Mahol
07dbea7033
tta: reindent
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
7416d61036
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
13 years ago
Justin Ruggles
6ab681a4c1
ttadec: fix invalid free when an error occurs while decoding 24-bit tta
13 years ago
Michael Niedermayer
ed83f97235
tta: Add some safety precautions to avoid freeing things that have not been allocated.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
c6abf21492
tta: do not leak memory if bps == 3
...
In bps == 3 case output is decoded directly.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
9aff2d1753
tta: use skip_bits_long()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Justin Ruggles
01ed1c390d
tta: cast output data pointer to the correct type
...
fixes "warning: assignment from incompatible pointer type"
13 years ago
Paul B Mahol
dd319f17e6
tta: remove obsolete and useless error message
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
52e9854a83
tta: fix 24-bit decoding.
...
Decode to the correct output buffer.
13 years ago
Michael Niedermayer
c88f0b728c
tta: Fix regression of 24bit decoding.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
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.
13 years ago
Michael Niedermayer
bd35dfeaa0
tta: Fix several warning: initialization from incompatible pointer type [enabled by default]
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Shitiz Garg
8bd1f1a4c8
ttadec: check channel count as read from extradata.
...
fixes floating-point exception due to channels being set to 0.
fixes Bug 128.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
13 years ago
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.
13 years ago
Justin Ruggles
b656c4d08e
tta: use an integer instead of a pointer to iterate output samples
13 years ago
Justin Ruggles
2f1d212fd0
tta: check for allocation failure of decode_buffer
13 years ago
Justin Ruggles
b5050539c9
tta: use correct frame_length calculation.
...
using a floating-point calculation is not necessary.
13 years ago
Justin Ruggles
c6056d4004
tta: add support for decoding 24-bit sample format
...
Note that this will not work in most cases with avconv and avplay due to the
AVCODEC_MAX_AUDIO_FRAME_SIZE limit, but it will decode correctly if given a
large enough output buffer.
13 years ago
Justin Ruggles
8664682d0e
cosmetics: indentation
13 years ago
Justin Ruggles
7b7a74a150
tta: remove pointless braces
13 years ago
Justin Ruggles
e6923f683c
tta: check output buffer size after adjusting frame length for last frame
13 years ago
Justin Ruggles
b16960a8a5
tta: fix reading of format in TTA header.
...
TTA does not support float at all, and format 2 is encrypted TTA.
13 years ago
Justin Ruggles
4d3e7a7516
tta: remove useless commented-out lines
13 years ago
Justin Ruggles
35f9d8c20a
tta: check remaining bitstream size while reading unary value
13 years ago