Lukasz Marek
72732307d9
lavc/options: add test for avcodec_copy_context
...
This test doesn't cover every possible issue with this function.
It covers options management only.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
8616c5b75a
lavc/options: fix leaks in avcodec_copy_context
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
53b2809f2c
lavc/options: don't copy priv context when it is not AVOption object
...
This prevents potential crash when opt API is used without a class.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
345cfd04d0
lavc/options: fix leaks in avcodec_free_context
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
7d75a399a4
lavc/options: fix rc_eq leak
...
rc_eq is an option, so it is copied by av_opt_copy(dest, src); above.
10 years ago
Vadim Kalinsky
d1d3904273
avcodec/options: Set AVCodecContext->codec upon initialization.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Lukasz Marek
01974a58df
lavc/options: initialize pkt_timebase
...
It's default in option_table.h is 0, but without this fix it is represented as 0/0.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
4a30277a59
lavc/options: set timecode_frame_start to -1 as option default
...
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Lukasz Marek
db2caf0a80
lavc/options: fix shallow copy context
...
avcodec_copy_context leaves shallow copy of string/binary/dict options.
Double free/accessing freed memory may occur.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
10 years ago
Anton Khirnov
a75c2eb25a
lavc: make rc_eq into private options of mpegvideo encoders
10 years ago
Anton Khirnov
7ea1b3472a
lavc: deprecate the use of AVCodecContext.time_base for decoding
...
When decoding, this field holds the inverse of the framerate that can be
written in the headers for some codecs. Using a field called 'time_base'
for this is very misleading, as there are no timestamps associated with
it. Furthermore, this field is used for a very different purpose during
encoding.
Add a new field, called 'framerate', to replace the use of time_base for
decoding.
10 years ago
Gabriel Dume
f929ab0569
cosmetics: Write NULL pointer equality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Michael Niedermayer
8b686c886c
avcodec/options: use av_opt_copy() in avcodec_copy_context() to copy priv_data
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e0d0745560
avcodec/options: leave priv_data in avcodec_copy_context() intact
...
previously it was freed but the pointer not cleared
Found-by: ruggles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
fd056029f4
lavc: add avcodec_free_context().
...
Right now, the caller has to manually manage some allocated
AVCodecContext fields, like extradata or subtitle_header. This is
fragile and prone to leaks, especially if we want to add more such
fields in the future.
The only reason for this behaviour is so that the AVStream codec context
can be reused for decoding. Such reuse is discouraged anyway, so this
commit is the first step to deprecating it.
11 years ago
Michael Niedermayer
97f856a4c2
avcodec/options: avcodec_copy_context() Check subtitle_header_size instead of setting it
...
The value is already copied in the generic code so it should always match
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
3b2fbe67bd
lavc: properly handle subtitle_header in avcodec_copy_context()
11 years ago
Anton Khirnov
efc7df6c1f
lavc: preserve the original private data in avcodec_copy_context()
...
If a non-NULL codec was passed to avcodec_alloc_context3(), private data
will be already allocated in dest.
11 years ago
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
11 years ago
Stefano Sabatini
d3397c3e82
lavc: remove dead FF_API_ALLOC_CONTEXT API
11 years ago
Michael Niedermayer
cba9a40d47
avcodec: free priv_data in avcodec_copy_context()
...
Fixes memleak
Fixes Ticket2216
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
b5a138652f
Give less generic names to global library option arrays
11 years ago
Nicolas George
ceb33f3aee
lavc: copy subtitle_header when copying context.
...
Fix trac ticket #2489 .
12 years ago
Michael Niedermayer
2ae91c86f3
avcodec_get_context_defaults3: set codec_id
...
Fixes Ticket1996
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Stefano Sabatini
96d815fc0c
lavc: add pkt_size field to AVFrame
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
0a0f19b577
lavc: add const to AVCodec* function parameters.
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
jamal
938e4470ae
options: Fix warning about incompatible pointer type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6fb7d03d74
lavc: seperate encoder/decoder class category
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
a5c7525bcb
set some categories of some AVClass structs
...
Please help setting the category for all remaining AVClasses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
hakuya
79e5902cf1
Exposing forced flag for DVD and PGS subtitles
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
hakuya
1f46b50a95
Added AVClass for AVSubtitleRect
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
128dda7016
lavc: add a sample_rate field to AVFrame.
...
The field is filled with the codec context information.
13 years ago
Nicolas George
4b0521eca9
lavc: add a channel_layout field to AVFrame.
...
The field is filled with the codec context information.
FIXME need a minor version bump.
13 years ago
Anton Khirnov
5626697104
Move AVFormatContext/AVCodecContext option tables to separate files.
...
This will allow us to automatically generate manpages for them.
13 years ago
Anton Khirnov
02beb9826b
lavc: deprecate AVCodecContext.sub_id.
...
In most places where it's used, it's as a pointless write-only field.
Only rv10 decoder actually reads from it, but it stores some internal
version info in it. There is no reason for it to be in a public field.
13 years ago
Justin Ruggles
182d4f1f38
libvorbis: fix use of minrate/maxrate AVOptions
...
- enable the options for audio encoding
- properly check for user-set maxrate
- use correct calling order in vorbis_encode_setup_managed()
13 years ago
Anton Khirnov
23bfcc066d
mpegvideo_enc: add quantizer_noise_shaping private option.
...
Deprecate corresponding AVCodecContext field.
13 years ago
Anton Khirnov
16b7557b79
lavc: deprecate AVCodecContext.inter_threshold.
...
It's unused.
13 years ago
Anton Khirnov
4f07f8196c
lavc: deprecate AVCodecContext.color_table_id.
...
It's currently only used as temporary storage by the mov demuxer. Make
it use a local variable instead.
13 years ago
Anton Khirnov
63efd83ae1
mpegvideo_enc: add chroma/luma_elim_threshold private options.
...
Deprecate corresponding AVCodecContext fields.
13 years ago
Anton Khirnov
af3d804f9f
mpegvideo_enc: add cbp_rd flag to mpv_flags.
...
Deprecate CODEC_FLAG_CBP_RD.
13 years ago
Anton Khirnov
ff71a383ac
mpegvideo_enc: add qp_rd flag to mpv_flags.
...
Deprecate CODEC_FLAG_QP_RD.
13 years ago
Anton Khirnov
a249f0cc23
mpegvideo_enc: add strict_gop flag to mpv_flags.
...
Deprecate CODEC_FLAG2_STRICT_GOP.
13 years ago
Anton Khirnov
ed019b8e5b
lavc: add -mpv_flags to mpegvideo_enc-based encoders.
...
Deprecate CODEC_FLAG2_SKIP_RD in favor of the corresponding mpv_flags
flag.
13 years ago
Diego Biurrun
0bf184e59c
Move PS2 MMI code below the mips subdirectory, where it belongs.
...
Also give a more suitable name to the MMI-optimized IDCT;
it is not PS2-specific, as the name currently suggests.
13 years ago
Diego Biurrun
0144fe6995
Remove Sun medialib glue code.
...
It is obscure, most likely unused and not bit-exact compared to
libavcodec due to a different IDCT transform algorithm.
13 years ago
Joseph Artsimovich
950930b461
Set default qmax for VC-3/DNxHD to 1024 (maximum allowed by VC-3 spec).
...
Also increase the global limit on qmax.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago