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
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