New upstream version 18.0.1+dfsg1

This commit is contained in:
Sebastian Ramacher 2017-04-19 21:54:15 +02:00
parent 6efda2859e
commit f2cf6cce50
1337 changed files with 41178 additions and 84670 deletions

View file

@ -178,7 +178,7 @@ void ff_decoder_refresh(void *opaque)
struct ff_frame *frame;
if (decoder && decoder->stream) {
if (decoder->stream) {
if (decoder->frame_queue.size == 0) {
if (!decoder->eof || !decoder->finished) {
// We expected a frame, but there were none

View file

@ -297,7 +297,13 @@ static bool find_decoder(struct ff_demuxer *demuxer, AVStream *stream)
}
if (codec == NULL) {
codec = avcodec_find_decoder(codec_context->codec_id);
if (codec_context->codec_id == AV_CODEC_ID_VP8)
codec = avcodec_find_decoder_by_name("libvpx");
else if (codec_context->codec_id == AV_CODEC_ID_VP9)
codec = avcodec_find_decoder_by_name("libvpx-vp9");
if (!codec)
codec = avcodec_find_decoder(codec_context->codec_id);
if (codec == NULL) {
av_log(NULL, AV_LOG_WARNING, "no decoder found for"
" codec with id %d",
@ -377,7 +383,7 @@ static bool open_input(struct ff_demuxer *demuxer,
}
if (avformat_open_input(format_context, demuxer->input,
input_format, NULL) != 0)
input_format, &demuxer->options.custom_options) != 0)
return false;
return avformat_find_stream_info(*format_context, NULL) >= 0;

View file

@ -40,6 +40,7 @@ struct ff_demuxer_options
bool is_hw_decoding;
bool is_looping;
enum AVDiscard frame_drop;
AVDictionary *custom_options;
};
typedef struct ff_demuxer_options ff_demuxer_options_t;

View file

@ -99,7 +99,8 @@ static const AVCodec *next_codec_for_id(enum AVCodecID id, const AVCodec *prev)
static void add_codec_to_list(const struct ff_format_desc *format_desc,
struct ff_codec_desc **first, struct ff_codec_desc **current,
enum AVCodecID id, const AVCodec *codec)
enum AVCodecID id, const AVCodec *codec,
bool ignore_compatability)
{
if (codec == NULL)
codec = avcodec_find_encoder(id);
@ -112,11 +113,13 @@ static void add_codec_to_list(const struct ff_format_desc *format_desc,
if (!av_codec_is_encoder(codec))
return;
// Format doesn't support this codec
unsigned int tag = av_codec_get_tag(format_desc->codec_tags,
codec->id);
if (tag == 0)
return;
if (!ignore_compatability) {
// Format doesn't support this codec
unsigned int tag = av_codec_get_tag(format_desc->codec_tags,
codec->id);
if (tag == 0)
return;
}
struct ff_codec_desc *d = av_mallocz(sizeof(struct ff_codec_desc));
@ -150,16 +153,17 @@ static void add_codec_to_list(const struct ff_format_desc *format_desc,
static void get_codecs_for_id(const struct ff_format_desc *format_desc,
struct ff_codec_desc **first, struct ff_codec_desc **current,
enum AVCodecID id)
enum AVCodecID id, bool ignore_compatability)
{
const AVCodec *codec = NULL;
while ((codec = next_codec_for_id(id, codec)))
add_codec_to_list(format_desc, first, current, codec->id,
codec);
codec, ignore_compatability);
}
const struct ff_codec_desc *ff_codec_supported(
const struct ff_format_desc *format_desc)
const struct ff_format_desc *format_desc,
bool ignore_compatability)
{
const AVCodecDescriptor **codecs;
unsigned int size;
@ -172,7 +176,8 @@ const struct ff_codec_desc *ff_codec_supported(
for(i = 0; i < size; i++) {
const AVCodecDescriptor *codec = codecs[i];
get_codecs_for_id(format_desc, &first, &current, codec->id);
get_codecs_for_id(format_desc, &first, &current, codec->id,
ignore_compatability);
}
av_free((void *)codecs);

View file

@ -37,7 +37,8 @@ const char *ff_codec_name_from_id(int codec_id);
// Codec Description
const struct ff_codec_desc *ff_codec_supported(
const struct ff_format_desc *format_desc);
const struct ff_format_desc *format_desc,
bool ignore_compatability);
void ff_codec_desc_free(const struct ff_codec_desc *codec_desc);
const char *ff_codec_desc_name(const struct ff_codec_desc *codec_desc);
const char *ff_codec_desc_long_name(const struct ff_codec_desc *codec_desc);