mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-25 22:19:17 +00:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: (27 commits) cmdutils: use new avcodec_is_decoder/encoder() functions. lavc: make codec_is_decoder/encoder() public. lavc: deprecate AVCodecContext.sub_id. libcdio: add a forgotten AVClass to the private context. swscale: remove "cpu flags" from -sws_flags description. proresenc: give user a possibility to alter some encoding parameters vorbisenc: add output buffer overwrite protection libopencore-amrnbenc: fix end-of-stream handling ra144enc: fix end-of-stream handling nellymoserenc: zero any leftover packet bytes nellymoserenc: use proper MDCT overlap delay qpeg: Use bytestream2 functions to prevent buffer overreads. swscale: make %rep unconditional. vp8: convert simple loopfilter x86 assembly to use named arguments. vp8: convert idct x86 assembly to use named arguments. vp8: convert mc x86 assembly to use named arguments. vp8: convert loopfilter x86 assembly to use cpuflags(). vp8: convert idct/mc x86 assembly to use cpuflags(). swscale: remove now unnecessary hack. x86inc: don't "bake" stack_offset in named arguments. ... Conflicts: cmdutils.c doc/APIchanges libavcodec/mpeg12.c libavcodec/options.c libavcodec/qpeg.c libavcodec/utils.c libavcodec/version.h libavdevice/libcdio.c tests/lavf-regression.sh Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
2af8f2cea6
29 changed files with 1050 additions and 910 deletions
|
@ -118,12 +118,12 @@ static void avcodec_init(void)
|
|||
ff_dsputil_static_init();
|
||||
}
|
||||
|
||||
static av_always_inline int codec_is_encoder(AVCodec *codec)
|
||||
int av_codec_is_encoder(AVCodec *codec)
|
||||
{
|
||||
return codec && (codec->encode || codec->encode2);
|
||||
}
|
||||
|
||||
static av_always_inline int codec_is_decoder(AVCodec *codec)
|
||||
int av_codec_is_decoder(AVCodec *codec)
|
||||
{
|
||||
return codec && codec->decode;
|
||||
}
|
||||
|
@ -798,7 +798,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
|
|||
|
||||
/* if the decoder init function was already called previously,
|
||||
free the already allocated subtitle_header before overwriting it */
|
||||
if (codec_is_decoder(codec))
|
||||
if (av_codec_is_decoder(codec))
|
||||
av_freep(&avctx->subtitle_header);
|
||||
|
||||
#define SANE_NB_CHANNELS 128U
|
||||
|
@ -845,7 +845,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
|
|||
ret = AVERROR(EINVAL);
|
||||
goto free_and_end;
|
||||
}
|
||||
if (codec_is_encoder(avctx->codec)) {
|
||||
if (av_codec_is_encoder(avctx->codec)) {
|
||||
int i;
|
||||
if (avctx->codec->sample_fmts) {
|
||||
for (i = 0; avctx->codec->sample_fmts[i] != AV_SAMPLE_FMT_NONE; i++)
|
||||
|
@ -914,7 +914,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
|
|||
}
|
||||
}
|
||||
|
||||
if (codec_is_decoder(avctx->codec) && !avctx->bit_rate)
|
||||
if (av_codec_is_decoder(avctx->codec) && !avctx->bit_rate)
|
||||
avctx->bit_rate = get_bit_rate(avctx);
|
||||
|
||||
ret=0;
|
||||
|
@ -1527,7 +1527,7 @@ av_cold int avcodec_close(AVCodecContext *avctx)
|
|||
av_opt_free(avctx->priv_data);
|
||||
av_opt_free(avctx);
|
||||
av_freep(&avctx->priv_data);
|
||||
if (codec_is_encoder(avctx->codec))
|
||||
if (av_codec_is_encoder(avctx->codec))
|
||||
av_freep(&avctx->extradata);
|
||||
avctx->codec = NULL;
|
||||
avctx->active_thread_type = 0;
|
||||
|
@ -1556,7 +1556,7 @@ AVCodec *avcodec_find_encoder(enum CodecID id)
|
|||
p = first_avcodec;
|
||||
id= remap_deprecated_codec_id(id);
|
||||
while (p) {
|
||||
if (codec_is_encoder(p) && p->id == id) {
|
||||
if (av_codec_is_encoder(p) && p->id == id) {
|
||||
if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) {
|
||||
experimental = p;
|
||||
} else
|
||||
|
@ -1574,7 +1574,7 @@ AVCodec *avcodec_find_encoder_by_name(const char *name)
|
|||
return NULL;
|
||||
p = first_avcodec;
|
||||
while (p) {
|
||||
if (codec_is_encoder(p) && strcmp(name,p->name) == 0)
|
||||
if (av_codec_is_encoder(p) && strcmp(name,p->name) == 0)
|
||||
return p;
|
||||
p = p->next;
|
||||
}
|
||||
|
@ -1587,7 +1587,7 @@ AVCodec *avcodec_find_decoder(enum CodecID id)
|
|||
p = first_avcodec;
|
||||
id= remap_deprecated_codec_id(id);
|
||||
while (p) {
|
||||
if (codec_is_decoder(p) && p->id == id) {
|
||||
if (av_codec_is_decoder(p) && p->id == id) {
|
||||
if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) {
|
||||
experimental = p;
|
||||
} else
|
||||
|
@ -1605,7 +1605,7 @@ AVCodec *avcodec_find_decoder_by_name(const char *name)
|
|||
return NULL;
|
||||
p = first_avcodec;
|
||||
while (p) {
|
||||
if (codec_is_decoder(p) && strcmp(name,p->name) == 0)
|
||||
if (av_codec_is_decoder(p) && strcmp(name,p->name) == 0)
|
||||
return p;
|
||||
p = p->next;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue