Anton Khirnov
669cc0f364
lavc: fix get_buffer() compatibility layer for audio.
...
planes - FF_ARRAY_ELEMS would be evaluated as unsigned and underflow
instead of being negative as was intended.
12 years ago
Stefano Sabatini
dae76e8c47
lavc/utils: fix typo and reword message in case of too low bitrate
12 years ago
Anton Khirnov
0f24a3ca99
lavc: remove disabled FF_API_OLD_ENCODE_VIDEO cruft
12 years ago
Anton Khirnov
f073b1500e
lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft
12 years ago
Anton Khirnov
5d606863c3
lavc: remove disabled FF_API_OLD_DECODE_AUDIO cruft
12 years ago
Clément Bœsch
160979f4b4
lavc/utils: make sure the iconv descriptor can be opened only once.
...
This prevents trying to do some subtitles conversion for each event when
the character encoding is not found. It now aborts early instead of
flooding stderr.
12 years ago
Anton Khirnov
7c45087b84
lavc: update the fallback versions of ff_thread_*
...
Fixes build without threads after
759001c534
.
12 years ago
Anton Khirnov
2eba9087f3
lavc: make up a fake frame channel layout when there is no real one.
...
This should ensure that a valid channel layout is always set on a frame,
until a better solution is implemented.
12 years ago
Anton Khirnov
15ec0450b4
lavc: allow decoders to override frame parameters.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Anton Khirnov
1afddbe59e
avpacket: use AVBuffer to allow refcounting the packets.
...
This will allow us to avoid copying the packets in many cases.
This breaks ABI.
12 years ago
Reimar Döffinger
efa7f42020
Use the avstring.h locale-independent character type functions
...
Make sure the behavior does not change with the locale.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Stefano Sabatini
70762508ec
lavc: Prettify printing of codec tags containing non alphanumeric characters
...
Make av_get_codec_tag_string() show codec tag string characters in a more
intelligible ways. For example the ascii char "@" is used as a number, so
should be displayed like "[64]" rather than as a printable character.
Apart alphanumeric chars, only the characters ' ' and '.' are used
literally in codec tags, all the other characters represent numbers.
This also avoids relying on locale-dependent character class functions.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Reimar Döffinger
88d55b827d
Remove incorrect use of ctype.h functions.
...
As far as I can tell the code should not change behaviour
depending on locale in any of these places.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Michael Niedermayer
cc38ca6748
avcodec/utils: use AVFrame accessor functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
bf90ef0314
avcodec: add ff_frame_get_metadatap()
...
This is needed for av_dict_*
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
7b2d50f81e
build: make iconv build configurable.
12 years ago
Nicolas George
ccc7bcc4fc
lavc: check return values consistency when decoding subtitles.
12 years ago
Michael Niedermayer
8a6449167a
avcodec_decode_audio4: check got_frame_ptr before handling initial skip
...
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f5c00b347d
avcodec_align_dimensions2: Ensure cinepak has large enough buffers.
...
This is partly redundant with the following patches, but its safer
Found-by: u-bo1b@0w.se
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
b1e6b144ed
lavc/utils: reindent in avcodec_decode_subtitle2() after f7963993
.
12 years ago
Clément Bœsch
f796399344
lavc: support subtitles character encoding conversion.
12 years ago
Clément Bœsch
8732271e40
lavc: mark bitmap based subtitles codecs as such.
12 years ago
Michael Niedermayer
a53b144ec0
avcodec: add avpriv_color_frame()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
d2a25c4032
get_buffer(): do not initialize the data.
...
There may be more decoders that rely on this. Those should be found and
fixed.
12 years ago
Diego Biurrun
c6507946d4
dsputil: Move STRIDE_ALIGN macro to the only place it is used
12 years ago
Michael Niedermayer
b75ac7c71c
lavc: include timebase in avcodec string at debug level.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
098d3891be
EVRC decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
d270c32025
avcodec_decode_audio: do not trust the channel layout, use the channel count.
...
Fixes memory corruption
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
bff3607547
lavc: set the default rc_initial_buffer_occupancy
...
rc_buffer_size is not set before.
Solve the initial the rate control underflow issue reported in
bug 222.
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Clément Bœsch
72ff8ee158
lavc: correctly set AVSubtitle format for text based subtitles.
12 years ago
Clément Bœsch
e3c25860dc
lavc/utils: reindent in avcodec_decode_subtitle2().
12 years ago
Clément Bœsch
67286fa98b
10l: export ff_bprint_to_extradata between libs using avpriv_ prefix.
...
Both libavformat and libavcodec requires this function.
12 years ago
Clément Bœsch
36e61e24e7
lavc: add ff_bprint_to_extradata() helper and use it.
...
This commit also makes sure the extradata and subtitle_header are NUL
terminated, without taking into account the trailing '\0' in account in
the size.
At the same time, it should fix 'warning: dereferencing type-punned
pointer will break strict-aliasing rules' warning for compilers who
don't consider uint8_t** and char** compatibles.
12 years ago
Diego Biurrun
015da965a6
libavcodec/utils: Add braces to shut up gcc warnings
...
libavcodec/utils.c:1050:5: warning: missing braces around initializer [-Wmissing-braces]
libavcodec/utils.c:1314:5: warning: missing braces around initializer [-Wmissing-braces]
12 years ago
Michael Niedermayer
67c1acf234
lavc/utils: fix 'warning: missing braces around initializer'
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2f436b1fce
lavc: Warn in case the set bitrate is very low
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Carl Eugen Hoyos
ec4a084581
Show underscores in av_get_codec_tag_string().
12 years ago
Stefano Sabatini
96d815fc0c
lavc: add pkt_size field to AVFrame
12 years ago
Janne Grunau
bd255f9feb
lavc: set frame parameters after decoding only if necessary
...
Direct rendering capable decoders call get_buffer() which will set the
frame parameters.
Prevents frames with wrong parameters when a decoder outputs delayed
frames after a resolution or pixel format change.
12 years ago
Michael Niedermayer
e8e575633f
lavc/utils: Do not require dimensions for PNG.
...
pngenc doesnt need them and mplayer doesnt set them.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Carl Eugen Hoyos
71b1912963
Print bpc (for bits per component) with pixel format if it is smaller than expected.
12 years ago
Michael Niedermayer
419ade4b61
lavc: check dimensions for video encoders
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7885fa7685
ff_lock_avcodec: make the lock state be consistent in case of failure.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2dec950f49
avcodec_open: if obtaining a lock fails, dont attempt to unlock it.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d7169280a6
frame_thread_encoder: fix locking while locks are held
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Reimar Döffinger
25fec8595d
avcodec: add ff_lock/unlock_avcodec functions.
...
Will be used in future patches, together with the
variable that allows checking whether the lock is held.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Michael Niedermayer
d2a3f08daf
lavc: move ff_init_buffer_info() down to ff_get_buffer()
...
and remove redundant code from ff_get_buffer()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
387bef95d2
lavc: factorise setting buffer type in avcodec_default_get_buffer().
12 years ago
Anton Khirnov
e57c4706e9
lavc: don't reuse audio buffers
...
Any performance gain from this is negligible and not worth the extra
code.
12 years ago