Anton Khirnov
d7b3ee9a3a
lavc: deprecate avcodec_get_frame_defaults().
...
Also bump libavcodec micro and add an APIchanges entry saying that
av_frame_* should now be used instead of the lavc AVFrame functions.
2013-12-11 20:39:55 +01:00
Anton Khirnov
95a8a5aca6
lavc: call av_frame_unref() instead of avcodec_get_frame_defaults().
...
avcodec_get_frame_defaults() will be deprecated.
2013-12-11 20:39:55 +01:00
Anton Khirnov
9431356218
lavc: deprecate avcodec_free_frame()
...
av_frame_free() should be used instead.
2013-12-11 20:39:54 +01:00
Anton Khirnov
37a749012a
lavc: rework handling of refcounted_frames=0
...
Use only proper AVFrame API (no assigning of whole frames, since that
hardcodes sizeof(AVFrame) into lavc).
Make a copy of the side data, so the caller can use av_frame_unref/free
on non-refcounted frames, eliminating the need for
avcodec_get_frame_defaults()/avcodec_free_frame().
2013-12-09 08:54:29 +01:00
Anton Khirnov
a1ee164869
lavc/decode_video(): always unref the frame if there is no output in decode_video
...
Not just on failure. This is the same thing that is done in the audio
path and should prevent leaks in decoders that allocate a frame, but
then end up not writing into it.
2013-12-09 08:44:34 +01:00
Anton Khirnov
85f947aefb
lavc: remove a pointless check in decode_audio4()
...
av_frame_unref() works fine on unallocated frames.
2013-12-09 08:44:24 +01:00
Anton Khirnov
d4f0f2d1e8
lavc: use buf[0] instead of data[0] as the indicator of an allocated frame
...
data[0] may be NULL for valid frames with hwaccel pixel formats.
2013-12-09 08:44:11 +01:00
Anton Khirnov
e5419709f5
lavc: remove the extended_data workarounds.
...
All decoders should now handle it properly.
2013-12-09 08:42:52 +01:00
Anton Khirnov
b9fb59d2ab
lavc: deprecate avcodec_alloc_frame().
2013-11-16 12:44:50 +01:00
Anton Khirnov
5b9c3b4505
Replace all instances of avcodec_alloc_frame() with av_frame_alloc().
2013-11-16 12:44:20 +01:00
Anton Khirnov
cce3e0a49f
Move av_fast_{m,re}alloc from lavc to lavu.
2013-11-14 09:42:22 +01:00
Luca Barbato
08303d7741
hwaccel: Simplify ff_find_hwaccel
...
It is always called by passing fields from an AVCodecContext.
2013-11-10 13:59:48 +01:00
Anton Khirnov
da6506c607
lavc: move AVCodecContext.pkt to AVCodecInternal
...
It's a private field, not meant to be accessed from outside lavc.
2013-11-04 08:51:26 +01:00
Anton Khirnov
38ecc3702d
pthread: store thread contexts in AVCodecInternal instead of AVCodecContext
...
It's a private field, it should not be visible to callers.
Deprecate AVCodecContext.thread_opaque
2013-11-04 08:51:26 +01:00
Anton Khirnov
0f6c1d6d64
lavc/utils: stop using deprecated avcodec_set_dimensions
2013-10-31 20:14:14 +01:00
Anton Khirnov
7644f5a807
lavc: replace avcodec_set_dimensions with ff_set_dimensions
...
avcodec_set_dimensions() is supposed to be an internal utility function,
there is no reason whatsoever for it to be public. Therefore deprecate
it.
2013-10-31 20:14:14 +01:00
Anton Khirnov
b9589f5a77
lavc: add error checking to apply_param_change.
2013-10-30 08:43:03 +01:00
Paul B Mahol
7e52080cb1
pcm: support 24-bit/32-bit little-endian planar
...
Used by LXF.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Diego Biurrun
e95930eda1
avcodec/utils: Simplify a condition that combines HAVE_NEON and ARCH_ARM
2013-08-21 09:40:39 +02:00
Diego Biurrun
7950e519bb
Disable deprecation warnings for cases where a replacement is available
2013-08-02 19:19:02 +02:00
Anton Khirnov
720a1de52f
lavc: free the padded last frame during audio encoding properly
2013-06-20 16:49:11 +02:00
Janne Grunau
985f34b756
utils: fix avcodec_flush_buffers pre-reference counting compatibility
...
The to_free AVframe must be freed just like the other ones.
Indeed, the calling application may expect all frames to be
released.
(This regression caused use-after-free in VLC with hwaccel.)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-06-16 15:10:58 +02:00
Anton Khirnov
799f57ac96
lavc: use AVFrame API properly in pad_last_frame().
...
This also simplifies the code.
2013-06-10 21:19:51 +02:00
Anton Khirnov
30e256430e
lavc/pthread: remove obsolete checks
...
Those were useful when avcodec_thread_init() was a public functions. It
was deprecated and removed some time ago, so those checks are not needed
anymore.
2013-05-17 07:44:40 +02:00
Anton Khirnov
e6c4ac7b5f
pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*
2013-05-15 07:46:51 +02:00
Matt Wolenetz
252c0bfdc0
lavc: Fix msvc compilation of utils.c with -WX (warnings treated as errors)
...
This fixes https://bugzilla.libav.org/show_bug.cgi?id=514 .
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-14 10:04:43 +03:00
Luca Barbato
e55e8b2c36
lavc: do not leak frames in avcodec_decode_audio4
...
Notwithstanding the return value the frame should be freed if
is not going to be used.
Reported-by: Matthew Wolenetz <wolenetz@chromium.org>
2013-05-07 14:37:32 +02:00
Diego Biurrun
6fee1b90ce
avcodec: Add av_cold attributes to init functions missing them
2013-05-04 21:09:45 +02:00
Diego Biurrun
088f38a4f9
avcodec: Drop unnecessary ff_ name prefixes from static functions
2013-04-30 16:02:02 +02:00
Anton Khirnov
e036bb7899
lavc: clear AVBuffers on decoded frames if refcounted_frames is not set
...
Otherwise some code might mistakenly think it is allowed to unref those
buffers, which would lead to double unref.
2013-04-30 11:15:32 +02:00
Anton Khirnov
a7f46586bf
ff_get_buffer(): allocate the frame for max(coded,display) dimensions
...
Needed e.g. for h264 cropping to work properly.
2013-04-19 09:26:53 +02:00
Anton Khirnov
9de9b828ef
lavc: don't overwrite display dimensions with coded dimensions.
2013-04-10 20:54:27 +02:00
Ronald S. Bultje
b93b27edb0
dsputil: Make dsputil selectable
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-04-10 11:04:05 +03:00
Janne Grunau
c24469e812
utils: add workaround for AVHWAccel in ff_get_buffer compat code
...
Since c977039e58
plane count for
PIX_FMT_HWACCEL pixel formats is 0 instead of 1. The created dummy
AVBuffers are still bogus since AVFrame does not hold frame data when
AVHWAccels are used.
2013-03-26 19:44:50 +01:00
Martin Storsjö
f1e9398621
lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo
...
Also move the declaration to internal.h, and add restrict qualifiers
to the declaration (as in the implementation).
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-26 09:50:02 +02:00
Martin Storsjö
75644335b9
lavc: Move start code finding to utils.c
...
This allows dropping the mpegvideo dependency from a number of
components.
This also fixes standalone building of the h264 parser, which
was broken in 64e438697
.
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-26 09:48:12 +02:00
Anton Khirnov
c977039e58
lavc, lavfi: fix counting number of planes in AVBufferRef wrappers
...
Number of planes is not always equal to the number of components even
for formats marked with PIX_FMT_PLANAR -- e.g. NV12 has three components
in two planes.
2013-03-19 11:12:17 +01:00
Anton Khirnov
6552808014
lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers
...
It is supposed to be height * linesize, not width * linesize.
Thanks to Hendrik Leppkes for pointing out the bug.
2013-03-17 09:10:04 +01:00
Diego Biurrun
f099d3d1d5
Add av_log_{ask_for_sample|missing_feature} replacements to libavutil
...
This allows reporting missing features and requesting samples from
all libraries in a standard way; with a simplified API.
2013-03-13 20:42:06 +01:00
Janne Grunau
a2816230c5
avframe: call release_buffer only if it is set
...
AVCodecContext release_buffer() shall be NULL for audio codecs using
get_buffer. The backward compatibility code hence have to check before
calling it.
2013-03-11 18:58:47 +01:00
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.
2013-03-10 22:19:52 +01:00
Anton Khirnov
0f24a3ca99
lavc: remove disabled FF_API_OLD_ENCODE_VIDEO cruft
2013-03-09 08:36:40 +01:00
Anton Khirnov
f073b1500e
lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft
2013-03-09 08:36:40 +01:00
Anton Khirnov
5d606863c3
lavc: remove disabled FF_API_OLD_DECODE_AUDIO cruft
2013-03-09 08:36:40 +01:00
Anton Khirnov
7c45087b84
lavc: update the fallback versions of ff_thread_*
...
Fixes build without threads after
759001c534
.
2013-03-08 10:22:10 +01:00
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.
2013-03-08 07:40:06 +01:00
Anton Khirnov
15ec0450b4
lavc: allow decoders to override frame parameters.
2013-03-08 07:39:44 +01:00
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
2013-03-08 07:38:30 +01:00
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.
2013-03-08 07:33:45 +01:00
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>
2013-03-07 15:16:36 +02:00