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
Anton Khirnov
ff953fecff
lavc: set frame properties in ff_get_buffer().
...
There is no point in duplicating this code in every get_buffer()
implementation.
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
Michael Niedermayer
d9bec3b6a2
lavc: fix duplicate stats_out line.
...
Found-by: Thierry Foucu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
01eed8c607
iff demuxer: 16SV support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
5a3370816f
av_get_audio_frame_duration: add ADPCM_AFC
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Stefano Sabatini
e55c3857d2
lavc/utils: check return value of avcodec_fill_audio_frame() for < 0
...
Assume that the value is always negative in case of error, as stated in
the docs, do not assume that the value cannot be != 0 in case of success.
12 years ago
Paul B Mahol
3d8e684f05
ADPCM IMA Dialogic decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
da8242e2d6
8svx: move pcm_s8_planar decoder to pcm.c
...
Removes limitation of max 2 channels for pcm_s8_planar decoder by moving
it to more natural place.
AV_CODEC_ID_8SVX_RAW is not used by anything anymore and is going to be
removed.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
9ba41ae63e
PCM signed 16-bit big-endian planar decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
467dfd5dfa
PCM signed 24-bit/32-bit little-endian planar decoder
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Luca Barbato
cc085993f4
avcodec: remove ff_is_hwaccel_pix_fmt
...
It is used only in one place and is unlikely it would be needed
elsewhere.
12 years ago
Luca Barbato
c1a02e884a
pixdesc: add av_pix_fmt_get_chroma_sub_sample
...
Deprecate avcodec_get_chroma_sub_sample.
12 years ago
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
12 years ago
Ilkka Ollakka
6d1270a0f9
decode_audio3: initialize AVFrame
...
Same fix and issue as in a25d912dca
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Justin Ruggles
0366664ef9
lavc: check channel count after decoder init
...
Ensures the decoder did not set channel count to an insanely high value
during initialization, which could cause large memory usage when it tries to
get a buffer during decoding.
12 years ago
Justin Ruggles
bb6941af2a
lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decoders
12 years ago
Paul B Mahol
dc239b3b40
av_get_audio_frame_duration: add IAC
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
7adc600219
av_get_audio_frame_duration: add G723_1
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
28bcca46ed
av_get_audio_frame_duration: fix IMC
...
Fixes Ticket1658
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
60d9ee1b75
lavc/utils: make sub decode consistent with A/V.
...
This allows side data to be transmitted properly with subtitles.
12 years ago
Anton Khirnov
1bc64c2814
lavc: initialize output AVFrame before decoding.
...
Avoids memleaks with audio when extended_data is nontrivial and the user
doesn't reset the frame.
Shouldn't have any effect for video for now, but might be useful in the
future.
12 years ago
Stefano Sabatini
4a227a706d
lavc/utils: fix a few grammar/style nits in log messages
...
In avcodec_open2(), apply consistent casing and avoid "or" conjunction at
the beginning of a sentence, in the messages issued in case of
experimental codec usage.
12 years ago
Stefano Sabatini
5ffadec30a
lavc/utils: propagate or return meaningful error codes in avcodec_open2()
12 years ago
Justin Ruggles
a5ef830b12
lavc: use the correct API version guard macro for avcodec_encode_audio()
12 years ago
Michael Niedermayer
22793d7bb3
ffmpeg/lavc: move experimental warnings to libavcodec.
...
This way they are available to all applications and not just ffmpeg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nathan Caldwell
c854102da7
avcodec: handle AVERROR_EXPERIMENTAL
...
Error out on init if a codec with CODEC_CAP_EXPERIMENTAL is requested
and strict_std_compliance is not FF_COMPLIANCE_EXPERIMENTAL.
Move the check from avconv to avcodec_open2() and return
AVERROR_EXPERIMENTAL accordingly.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago