Anton Khirnov
ba357e9869
avprobe: switch to codecpar
2016-02-26 09:15:29 +01:00
Anton Khirnov
567d6d5f9d
avprobe: add local per-stream state
...
This will be useful in the following commits.
2016-02-26 09:15:20 +01:00
Anton Khirnov
c9478410c6
avprobe: add local per-file state
...
Do not pass just a bare AVFormatContext pointer around, wrap it in
struct. This will be useful in the following commits.
2016-02-26 09:15:06 +01:00
Anton Khirnov
c80344d010
mpegvideo_enc: use avcodec_free_context() instead of av_free()
2016-02-26 09:14:59 +01:00
Anton Khirnov
168a443d43
avprobe: print information from the codec descriptor
...
avprobe is not doing any decoding, so this is more correct than printing
information from a random codec implementation.
2016-02-26 09:14:49 +01:00
Anton Khirnov
e7188a1a84
avprobe: remove a pointless condition and a dead branch
...
AVStream.codec is always non-NULL
2016-02-26 09:14:38 +01:00
Anton Khirnov
dc4983d78a
APIchanges: add missing hashes and dates
...
Also, remove a stray line (apparently fallout from conflict resolution).
2016-02-26 09:14:13 +01:00
Anton Khirnov
3e8fd93b6a
lavf: add a missing bump and APIchanges for the codecpar switch
2016-02-26 09:14:13 +01:00
Vittorio Giovara
e66fa35392
vc1dec: Check group allocations separatedly
...
This avoids accessing NULL pointers in case of error.
2016-02-25 15:21:42 -05:00
Vittorio Giovara
01f0e6a0c9
vc1dec: Fix leak on error for array allocations
...
The deinit function in the 'error' section will correctly free
everything.
2016-02-25 15:20:53 -05:00
Vittorio Giovara
f91d94bdfc
vc1dec: Properly call deinit function on error
2016-02-25 15:20:24 -05:00
Vittorio Giovara
35b1cd343c
vc1dec: Drop commented out cruft
2016-02-25 15:19:36 -05:00
Vittorio Giovara
fa55addd23
img2: Drop av_ prefix for a static function
...
This prefix is reserved for public functions only.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-02-24 13:56:46 -05:00
Diego Biurrun
d6e49096c0
idct: Only build prores IDCT if ProRes decoder is enabled
2016-02-24 11:41:01 +01:00
Anton Khirnov
3c53627ac1
qsvdec: store the sync point in heap memory
...
The reasoning is the same as for the corresponding qsvenc patch.
2016-02-24 10:41:45 +01:00
Maxym Dmytrychenko
a1335149fd
qsvenc: store the sync point in heap memory
...
The QSV runtime expects the sync point address passed to
MFXVideoENCODE_EncodeFrameAsync() to be valid until
MFXVideoCORE_SyncOperation().
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-02-24 10:14:40 +01:00
Anton Khirnov
1138eb5509
vsrc_movie: convert to codecpar
2016-02-24 10:08:37 +01:00
Anton Khirnov
ac6d53589f
examples/transcode_aac: convert to codecpar
2016-02-24 10:08:34 +01:00
Anton Khirnov
a9e1f2cc61
examples/qsvdec: convert to codecpar
2016-02-24 10:08:30 +01:00
Anton Khirnov
9897d9f4e0
examples/output: convert to codecpar
2016-02-24 10:08:24 +01:00
Anton Khirnov
c23152a903
avplay: convert do codecpar
2016-02-24 10:05:43 +01:00
Anton Khirnov
0705f5960c
avplay: do not use AVStream.codec for decoding
...
AVStream.codec is now deprecated. Allocate a separate codec context
instead.
2016-02-24 10:05:31 +01:00
Anton Khirnov
15e84ed3f1
avconv: convert to codecpar
...
The switch is not yet complete because the parsers and the bistream
filters do not have a new AVCodecParam-based API yet.
2016-02-23 17:01:58 +01:00
Anton Khirnov
5b9cdf8cba
avconv: switch opening decoders and encoders
...
Open decoders first, next encoders. This makes sure that that
subtitle_header is always set properly, without relying on
avformat_find_stream_info() setting it.
2016-02-23 17:01:58 +01:00
Anton Khirnov
9200514ad8
lavf: replace AVStream.codec with AVStream.codecpar
...
Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.
In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.
There are multiple important problems with this approach:
- the fields in AVCodecContext are in general one of
* stream parameters
* codec options
* codec state
However, it's not clear which ones are which. It is consequently
unclear which fields are a demuxer allowed to set or a muxer allowed to
read. This leads to erratic behaviour depending on whether decoding or
encoding is being performed or not (and whether it uses the AVStream
embedded codec context).
- various synchronization issues arising from the fact that the same
context is used by several different APIs (muxers/demuxers,
parsers, bitstream filters and encoders/decoders) simultaneously, with
there being no clear rules for who can modify what and the different
processes being typically delayed with respect to each other.
- avformat_find_stream_info() making it necessary to support opening
and closing a single codec context multiple times, thus
complicating the semantics of freeing various allocated objects in the
codec context.
Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
2016-02-23 17:01:58 +01:00
Anton Khirnov
a8068346e4
lavc: add a variant of av_get_audio_frame_duration working with AVCodecParameters
2016-02-23 17:01:58 +01:00
Anton Khirnov
998e1b8f52
lavc: add codec parameters API
...
This API is intended to allow passing around codec parameters without
using full AVCodecContext (which also contains codec options and
encoder/decoder state).
2016-02-23 17:01:58 +01:00
Diego Biurrun
257b30af8e
x86: hevc: Fix linking with both yasm and optimizations disabled
...
Some optimized functions reference optimized symbols, so the functions
must be explicitly disabled when those symbols are unavailable.
2016-02-23 11:47:54 +01:00
Diego Biurrun
cd846b4797
fate: Ignore errors from concatenating report files
...
Some files may be missing for valid reasons, e.g. on compile failure.
2016-02-23 11:45:37 +01:00
Diego Biurrun
9328adcc80
fate: Be silent when fetching Git updates
2016-02-23 11:45:37 +01:00
Marton Balint
5e555f9300
mpeg12enc: always write closed gops for intra only outputs
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-02-22 19:08:56 -05:00
Michael Niedermayer
f435d081b0
h264: Add an AVClass pointer to H264Context
...
Sample-Id: asan_heap-uaf_3660f67_757_cov_1257014655_Hi422FR1_SONY_A.jsv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-02-22 19:08:56 -05:00
Vittorio Giovara
0837d1dfe2
libx264: Fix noise_reduction option assignment
...
First check the context, then check internal option. Drop the ! typo.
Introduced in 60f0fde309
.
2016-02-22 19:06:48 -05:00
Anton Khirnov
ec4c483976
lavf: add a protocol whitelist/blacklist for file opened internally
...
Should make the default behaviour safer for careless callers that open
random untrusted files.
Bug-Id: CVE-2016-1897
Bug-Id: CVE-2016-1898
2016-02-22 11:48:30 +01:00
Anton Khirnov
8c0ceafb0f
urlprotocol: receive a list of protocols from the caller
...
This way, the decisions about which protocols are available for use in
any given situations can be delegated to the caller.
2016-02-22 11:45:31 +01:00
Anton Khirnov
cae448cfbf
aviobuf: add a private data struct for avio_open()ed contexts
...
It will be useful in the following commits.
2016-02-22 11:36:47 +01:00
Anton Khirnov
832a202c47
protocols: make the list of protocols static
...
Disallow other code to touch it directly, now it's only accessible
through a blacklisting/whitelisting function.
2016-02-22 11:35:57 +01:00
Anton Khirnov
7d61dc95d7
lavf: move urlcontext_child_class_next() to protocols.c
...
It needs to access the list of protocols directly, so it more properly
belongs there.
2016-02-22 11:35:52 +01:00
Anton Khirnov
0fa00d0591
lavf: move avio_enum_protocols() to protocols.c
...
It's a more appropriate place for it.
2016-02-22 11:35:46 +01:00
Anton Khirnov
2758cdedfb
lavf: reorganize URLProtocols
...
Instead of a linked list constructed at av_register_all(), store them
in a constant array of pointers.
Since no registration is necessary now, this removes some global state
from lavf. This will also allow the urlprotocol layer caller to limit
the available protocols in a simple and flexible way in the following
commits.
2016-02-22 11:30:58 +01:00
Anton Khirnov
225e84e745
hls: disallow opening nested files in child demuxers
2016-02-22 11:30:33 +01:00
Anton Khirnov
e192cd9ce2
smoothstreamingenc: do not open the files as read+write
...
They are only written to, never read.
2016-02-22 11:30:24 +01:00
Anton Khirnov
d082078a88
dashenc: eliminate ffurl_* usage
...
Now all IO should go through the IO callbacks and be interceptable by
the caller.
2016-02-22 11:29:00 +01:00
Anton Khirnov
7fbb3b5b98
lavf: use the io_open callbacks for files opened from open_input() as well
...
There is no real reason to treat them differently.
2016-02-22 11:28:35 +01:00
Anton Khirnov
5efd91284e
avprobe: do not call avio_close() on a custom context
...
avio_close() can only be called on AVIOContexts created by avio_open(2).
2016-02-22 11:28:26 +01:00
Anton Khirnov
dc6527ed90
nutenc: do not use AVCodecContext.frame_size
...
It will in general not be available. Use block_align if known or fall
back to av_get_audio_frame_duration().
2016-02-22 11:28:00 +01:00
Luca Barbato
bf7be043fc
matroska: Always consider S_TEXT/UTF8 as SRT when demuxing
...
Reported-By: Maxim Koitsov <maksbotan@gentoo.org>
2016-02-22 09:40:16 +01:00
Diego Biurrun
8caadfc53d
fate: Be silent when switching to Git branch
2016-02-20 17:03:40 +01:00
Diego Biurrun
8d918a98aa
rtpdec: Use the right logging context
2016-02-19 20:38:18 +01:00
Diego Biurrun
d24bd96bdd
build: Disentangle VC-1 decoder and parser
2016-02-19 20:38:18 +01:00