41#include "libavutil/avassert.h"
42#include "libavutil/avstring.h"
43#include "libavutil/display.h"
44#include "libavutil/error.h"
45#include "libavutil/intreadwrite.h"
46#include "libavutil/opt.h"
47#include "libavutil/parseutils.h"
48#include "libavutil/pixdesc.h"
49#include "libavutil/time.h"
50#include "libavutil/timestamp.h"
51#include "libavutil/thread.h"
52#include "libavutil/threadmessage.h"
54#include "libavcodec/packet.h"
56#include "libavformat/avformat.h"
107 AVStream *st =
d->f.ctx->streams[pkt->stream_index];
109 if (pkt->stream_index <
d->nb_streams_warn)
111 av_log(NULL, AV_LOG_WARNING,
112 "New %s stream %d:%d at pos:%"PRId64
" and DTS:%ss\n",
113 av_get_media_type_string(st->codecpar->codec_type),
114 d->f.index, pkt->stream_index,
115 pkt->pos, av_ts2timestr(pkt->dts, &st->time_base));
116 d->nb_streams_warn = pkt->stream_index + 1;
120 int64_t last_duration)
125 ist->
max_pts - (uint64_t)ist->
min_pts < INT64_MAX - last_duration)
129 av_compare_ts(
d->duration,
d->time_base,
130 last_duration, ist->
st->time_base) < 0) {
131 d->duration = last_duration;
132 d->time_base = ist->
st->time_base;
139 AVFormatContext *is = ifile->
ctx;
143 ret = avformat_seek_file(is, -1, INT64_MIN, is->start_time, is->start_time, 0);
151 int got_durations = 0;
153 while (got_durations < ifile->audio_duration_queue_size) {
165 int64_t duration = 0;
169 duration = av_rescale_q(1, av_inv_q(ist->
framerate), ist->
st->time_base);
170 }
else if (ist->
st->avg_frame_rate.num) {
171 duration = av_rescale_q(1, av_inv_q(ist->
st->avg_frame_rate), ist->
st->time_base);
194 av_log(NULL, AV_LOG_INFO,
"demuxer -> ist_index:%d:%d type:%s "
195 "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s\n",
196 ifile->
index, pkt->stream_index,
197 av_get_media_type_string(ist->
st->codecpar->codec_type),
198 av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ist->
st->time_base),
199 av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ist->
st->time_base),
200 av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ist->
st->time_base));
204 ist->
st->pts_wrap_bits < 64) {
205 int64_t stime, stime2;
207 stime = av_rescale_q(start_time, AV_TIME_BASE_Q, ist->
st->time_base);
208 stime2= stime + (1ULL<<ist->
st->pts_wrap_bits);
211 if(stime2 > stime && pkt->dts != AV_NOPTS_VALUE && pkt->dts > stime + (1LL<<(ist->
st->pts_wrap_bits-1))) {
212 pkt->dts -= 1ULL<<ist->
st->pts_wrap_bits;
215 if(stime2 > stime && pkt->pts != AV_NOPTS_VALUE && pkt->pts > stime + (1LL<<(ist->
st->pts_wrap_bits-1))) {
216 pkt->pts -= 1ULL<<ist->
st->pts_wrap_bits;
221 if (pkt->dts != AV_NOPTS_VALUE)
222 pkt->dts += av_rescale_q(ifile->
ts_offset, AV_TIME_BASE_Q, ist->
st->time_base);
223 if (pkt->pts != AV_NOPTS_VALUE)
224 pkt->pts += av_rescale_q(ifile->
ts_offset, AV_TIME_BASE_Q, ist->
st->time_base);
226 if (pkt->pts != AV_NOPTS_VALUE)
228 if (pkt->dts != AV_NOPTS_VALUE)
231 duration = av_rescale_q(
d->duration,
d->time_base, ist->
st->time_base);
232 if (pkt->pts != AV_NOPTS_VALUE) {
233 pkt->pts += duration;
238 if (pkt->dts != AV_NOPTS_VALUE)
239 pkt->dts += duration;
242 if (ist->
st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO &&
243 av_stream_get_parser(ist->
st))
244 *repeat_pict = av_stream_get_parser(ist->
st)->repeat_pict;
250 snprintf(name,
sizeof(name),
"dmx%d:%s", f->
index, f->
ctx->iformat->name);
251 ff_thread_setname(name);
259 unsigned flags =
d->non_blocking ? AV_THREAD_MESSAGE_NONBLOCK : 0;
262 pkt = av_packet_alloc();
264 ret = AVERROR(ENOMEM);
273 ret = av_read_frame(f->
ctx, pkt);
275 if (ret == AVERROR(EAGAIN)) {
283 ret = av_thread_message_queue_send(
d->in_thread_queue, &msg, 0);
292 if (ret == AVERROR_EOF)
293 av_log(NULL, AV_LOG_VERBOSE,
"EOF in input file %d\n", f->
index);
295 av_log(NULL, AV_LOG_ERROR,
"Error demuxing input file %d: %s\n",
296 f->
index, av_err2str(ret));
302 av_pkt_dump_log2(NULL, AV_LOG_INFO, pkt,
do_hex_dump,
303 f->
ctx->streams[pkt->stream_index]);
310 av_packet_unref(pkt);
314 if (pkt->flags & AV_PKT_FLAG_CORRUPT) {
316 "%s: corrupt input packet in stream %d\n",
317 f->
ctx->url, pkt->stream_index);
319 av_packet_unref(pkt);
320 ret = AVERROR_INVALIDDATA;
327 msg.
pkt = av_packet_alloc();
329 av_packet_unref(pkt);
330 ret = AVERROR(ENOMEM);
333 av_packet_move_ref(msg.
pkt, pkt);
334 ret = av_thread_message_queue_send(
d->in_thread_queue, &msg, flags);
335 if (flags && ret == AVERROR(EAGAIN)) {
337 ret = av_thread_message_queue_send(
d->in_thread_queue, &msg, flags);
338 av_log(f->
ctx, AV_LOG_WARNING,
339 "Thread message queue blocking; consider raising the "
340 "thread_queue_size option (current value: %d)\n",
341 d->thread_queue_size);
344 if (ret != AVERROR_EOF)
345 av_log(f->
ctx, AV_LOG_ERROR,
346 "Unable to send packet to main thread: %s\n",
348 av_packet_free(&msg.
pkt);
355 av_thread_message_queue_set_err_recv(
d->in_thread_queue, ret);
357 av_packet_free(&pkt);
359 av_log(NULL, AV_LOG_VERBOSE,
"Terminating demuxer thread %d\n", f->
index);
369 if (!
d->in_thread_queue)
371 av_thread_message_queue_set_err_send(
d->in_thread_queue, AVERROR_EOF);
372 while (av_thread_message_queue_recv(
d->in_thread_queue, &msg, 0) >= 0)
373 av_packet_free(&msg.
pkt);
375 pthread_join(
d->thread, NULL);
376 av_thread_message_queue_free(&
d->in_thread_queue);
385 if (
d->thread_queue_size <= 0)
389 (f->
ctx->pb ? !f->
ctx->pb->seekable :
390 strcmp(f->
ctx->iformat->name,
"lavfi")))
392 ret = av_thread_message_queue_alloc(&
d->in_thread_queue,
398 int nb_audio_dec = 0;
403 ist->
st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO);
416 av_log(NULL, AV_LOG_ERROR,
"pthread_create failed: %s. Try to increase `ulimit -v` or decrease `ulimit -s`.\n", strerror(ret));
423 av_thread_message_queue_free(&
d->in_thread_queue);
434 if (!
d->in_thread_queue) {
442 int64_t file_start =
copy_ts * (
449 int64_t stream_ts_offset, pts, now;
451 stream_ts_offset = FFMAX(ist->
first_dts != AV_NOPTS_VALUE ? ist->
first_dts : 0, file_start);
452 pts = av_rescale(ist->
dts, 1000000, AV_TIME_BASE);
453 now = (av_gettime_relative() - ist->
start) * scale + stream_ts_offset;
455 return AVERROR(EAGAIN);
459 ret = av_thread_message_queue_recv(
d->in_thread_queue, &msg,
461 AV_THREAD_MESSAGE_NONBLOCK : 0);
482 av_packet_free(&ist->
pkt);
490 avcodec_free_context(&ist->
dec_ctx);
491 avcodec_parameters_free(&ist->
par);
510 avformat_close_input(&f->
ctx);
516 enum HWAccelID hwaccel_id,
enum AVHWDeviceType hwaccel_device_type)
519 char *codec_name = NULL;
523 const AVCodec *codec =
find_codec_or_die(NULL, codec_name, st->codecpar->codec_type, 0);
524 st->codecpar->codec_id = codec->id;
525 if (
recast_media && st->codecpar->codec_type != codec->type)
526 st->codecpar->codec_type = codec->type;
529 if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO &&
531 hwaccel_device_type != AV_HWDEVICE_TYPE_NONE) {
535 while ((c = av_codec_iterate(&i))) {
536 const AVCodecHWConfig *config;
538 if (c->id != st->codecpar->codec_id ||
539 !av_codec_is_decoder(c))
542 for (
int j = 0; (config = avcodec_get_hw_config(c, j)); j++) {
543 if (config->device_type == hwaccel_device_type) {
544 av_log(NULL, AV_LOG_VERBOSE,
"Selecting decoder '%s' because of requested hwaccel method %s\n",
545 c->name, av_hwdevice_get_type_name(hwaccel_device_type));
552 return avcodec_find_decoder(st->codecpar->codec_id);
558 AVCodecContext *dec = ist->
dec_ctx;
560 if (dec->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) {
561 char layout_name[256];
565 av_channel_layout_default(&dec->ch_layout, dec->ch_layout.nb_channels);
566 if (dec->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC)
568 av_channel_layout_describe(&dec->ch_layout, layout_name,
sizeof(layout_name));
569 av_log(NULL, AV_LOG_WARNING,
"Guessed Channel Layout for Input Stream "
570 "#%d.%d : %s\n", ist->
file_index, ist->
st->index, layout_name);
576 AVFormatContext *ctx, AVStream *st)
578 double rotation = DBL_MAX;
579 int hflip = -1, vflip = -1;
580 int hflip_set = 0, vflip_set = 0, rotation_set = 0;
587 rotation_set = rotation != DBL_MAX;
588 hflip_set = hflip != -1;
589 vflip_set = vflip != -1;
591 if (!rotation_set && !hflip_set && !vflip_set)
594 buf = (int32_t *)av_stream_new_side_data(st, AV_PKT_DATA_DISPLAYMATRIX,
sizeof(int32_t) * 9);
596 av_log(NULL, AV_LOG_FATAL,
"Failed to generate a display matrix!\n");
600 av_display_rotation_set(buf,
601 rotation_set ? -(rotation) : -0.0f);
603 av_display_matrix_flip(buf,
604 hflip_set ? hflip : 0,
605 vflip_set ? vflip : 0);
612 AVFormatContext *ic = f->
ctx;
615 for (i = 0; i < ic->nb_streams; i++) {
616 AVStream *st = ic->streams[i];
617 AVCodecParameters *par = st->codecpar;
619 char *framerate = NULL, *hwaccel_device = NULL;
620 const char *hwaccel = NULL;
621 char *hwaccel_output_format = NULL;
622 char *codec_tag = NULL;
624 char *discard_str = NULL;
625 const AVClass *cc = avcodec_get_class();
626 const AVOption *discard_opt = av_opt_find(&cc,
"skip_frame", NULL,
627 0, AV_OPT_SEARCH_FAKE_OBJ);
633 st->discard = AVDISCARD_ALL;
647 uint32_t tag = strtol(codec_tag, &next, 0);
649 tag = AV_RL32(codec_tag);
650 st->codecpar->codec_tag = tag;
653 if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
658 hwaccel_output_format, ic, st);
660 if (!hwaccel_output_format && hwaccel && !strcmp(hwaccel,
"cuvid")) {
661 av_log(NULL, AV_LOG_WARNING,
662 "WARNING: defaulting hwaccel_output_format to cuda for compatibility "
663 "with old commandlines. This behaviour is DEPRECATED and will be removed "
664 "in the future. Please explicitly set \"-hwaccel_output_format cuda\".\n");
666 }
else if (!hwaccel_output_format && hwaccel && !strcmp(hwaccel,
"qsv")) {
667 av_log(NULL, AV_LOG_WARNING,
668 "WARNING: defaulting hwaccel_output_format to qsv for compatibility "
669 "with old commandlines. This behaviour is DEPRECATED and will be removed "
670 "in the future. Please explicitly set \"-hwaccel_output_format qsv\".\n");
672 }
else if (!hwaccel_output_format && hwaccel && !strcmp(hwaccel,
"mediacodec")) {
676 }
else if (hwaccel_output_format) {
679 av_log(NULL, AV_LOG_FATAL,
"Unrecognised hwaccel output "
680 "format: %s", hwaccel_output_format);
688 if (!strcmp(hwaccel,
"nvdec") || !strcmp(hwaccel,
"cuvid"))
691 if (!strcmp(hwaccel,
"none"))
693 else if (!strcmp(hwaccel,
"auto"))
696 enum AVHWDeviceType type = av_hwdevice_find_type_by_name(hwaccel);
697 if (type != AV_HWDEVICE_TYPE_NONE) {
703 av_log(NULL, AV_LOG_FATAL,
"Unrecognized hwaccel: %s.\n",
705 av_log(NULL, AV_LOG_FATAL,
"Supported hwaccels: ");
706 type = AV_HWDEVICE_TYPE_NONE;
707 while ((type = av_hwdevice_iterate_types(type)) !=
708 AV_HWDEVICE_TYPE_NONE)
709 av_log(NULL, AV_LOG_FATAL,
"%s ",
710 av_hwdevice_get_type_name(type));
711 av_log(NULL, AV_LOG_FATAL,
"\n");
718 if (hwaccel_device) {
736 if ((o->
video_disable && ist->
st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) ||
737 (o->
audio_disable && ist->
st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) ||
739 (o->
data_disable && ist->
st->codecpar->codec_type == AVMEDIA_TYPE_DATA))
742 if (discard_str && av_opt_eval_int(&cc, discard_opt, discard_str, &ist->
user_set_discard) < 0) {
743 av_log(NULL, AV_LOG_ERROR,
"Error parsing discard %s.\n",
751 ist->
dec_ctx = avcodec_alloc_context3(ist->
dec);
755 ret = avcodec_parameters_to_context(ist->
dec_ctx, par);
757 av_log(NULL, AV_LOG_ERROR,
"Error initializing the decoder context.\n");
765 ist->
pkt = av_packet_alloc();
770 ist->
dec_ctx->flags |= AV_CODEC_FLAG_BITEXACT;
772 switch (par->codec_type) {
773 case AVMEDIA_TYPE_VIDEO:
775 ist->
dec_ctx->framerate = st->avg_frame_rate;
778 if (framerate && av_parse_video_rate(&ist->
framerate,
780 av_log(NULL, AV_LOG_ERROR,
"Error parsing framerate %s.\n",
791 case AVMEDIA_TYPE_AUDIO:
796 case AVMEDIA_TYPE_DATA:
797 case AVMEDIA_TYPE_SUBTITLE: {
798 char *canvas_size = NULL;
802 av_parse_video_size(&ist->
dec_ctx->width, &ist->
dec_ctx->height, canvas_size) < 0) {
803 av_log(NULL, AV_LOG_FATAL,
"Invalid canvas size: %s.\n", canvas_size);
808 case AVMEDIA_TYPE_ATTACHMENT:
809 case AVMEDIA_TYPE_UNKNOWN:
815 ist->
par = avcodec_parameters_alloc();
819 ret = avcodec_parameters_from_context(ist->
par, ist->
dec_ctx);
821 av_log(NULL, AV_LOG_ERROR,
"Error initializing the decoder context.\n");
830 AVIOContext *out = NULL;
831 const AVDictionaryEntry *e;
833 if (!st->codecpar->extradata_size) {
834 av_log(NULL, AV_LOG_WARNING,
"No extradata to dump in stream #%d:%d.\n",
838 if (!*filename && (e = av_dict_get(st->metadata,
"filename", NULL, 0)))
841 av_log(NULL, AV_LOG_FATAL,
"No filename specified and no 'filename' tag"
848 if ((ret = avio_open2(&out, filename, AVIO_FLAG_WRITE, &
int_cb, NULL)) < 0) {
849 av_log(NULL, AV_LOG_FATAL,
"Could not open file %s for writing.\n",
854 avio_write(out, st->codecpar->extradata, st->codecpar->extradata_size);
864 const AVInputFormat *file_iformat = NULL;
867 AVDictionary *unused_opts = NULL;
868 const AVDictionaryEntry *e = NULL;
869 char * video_codec_name = NULL;
870 char * audio_codec_name = NULL;
871 char *subtitle_codec_name = NULL;
872 char * data_codec_name = NULL;
873 int scan_all_pmts_set = 0;
880 if (stop_time != INT64_MAX && recording_time != INT64_MAX) {
881 stop_time = INT64_MAX;
882 av_log(NULL, AV_LOG_WARNING,
"-t and -to cannot be used together; using -t.\n");
885 if (stop_time != INT64_MAX && recording_time == INT64_MAX) {
886 int64_t start = start_time == AV_NOPTS_VALUE ? 0 : start_time;
887 if (stop_time <= start) {
888 av_log(NULL, AV_LOG_ERROR,
"-to value smaller than -ss; aborting.\n");
891 recording_time = stop_time - start;
896 if (!(file_iformat = av_find_input_format(o->
format))) {
897 av_log(NULL, AV_LOG_FATAL,
"Unknown input format: '%s'\n", o->
format);
902 if (!strcmp(filename,
"-"))
906 strcmp(filename,
"fd:") &&
907 strcmp(filename,
"/dev/stdin");
910 ic = avformat_alloc_context();
917 const AVClass *priv_class;
918 if (file_iformat && (priv_class = file_iformat->priv_class) &&
919 av_opt_find(&priv_class,
"ch_layout", NULL, 0,
920 AV_OPT_SEARCH_FAKE_OBJ)) {
927 const AVClass *priv_class;
928 if (file_iformat && (priv_class = file_iformat->priv_class) &&
929 av_opt_find(&priv_class,
"ch_layout", NULL, 0,
930 AV_OPT_SEARCH_FAKE_OBJ)) {
935 const AVClass *priv_class;
938 if (file_iformat && (priv_class = file_iformat->priv_class) &&
939 av_opt_find(&priv_class,
"framerate", NULL, 0,
940 AV_OPT_SEARCH_FAKE_OBJ)) {
956 if (video_codec_name)
957 ic->video_codec =
find_codec_or_die(NULL, video_codec_name , AVMEDIA_TYPE_VIDEO , 0);
958 if (audio_codec_name)
959 ic->audio_codec =
find_codec_or_die(NULL, audio_codec_name , AVMEDIA_TYPE_AUDIO , 0);
960 if (subtitle_codec_name)
961 ic->subtitle_codec =
find_codec_or_die(NULL, subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0);
963 ic->data_codec =
find_codec_or_die(NULL, data_codec_name , AVMEDIA_TYPE_DATA , 0);
965 ic->video_codec_id = video_codec_name ? ic->video_codec->id : AV_CODEC_ID_NONE;
966 ic->audio_codec_id = audio_codec_name ? ic->audio_codec->id : AV_CODEC_ID_NONE;
967 ic->subtitle_codec_id = subtitle_codec_name ? ic->subtitle_codec->id : AV_CODEC_ID_NONE;
968 ic->data_codec_id = data_codec_name ? ic->data_codec->id : AV_CODEC_ID_NONE;
970 ic->flags |= AVFMT_FLAG_NONBLOCK;
972 ic->flags |= AVFMT_FLAG_BITEXACT;
973 ic->interrupt_callback =
int_cb;
975 if (!av_dict_get(o->
g->
format_opts,
"scan_all_pmts", NULL, AV_DICT_MATCH_CASE)) {
976 av_dict_set(&o->
g->
format_opts,
"scan_all_pmts",
"1", AV_DICT_DONT_OVERWRITE);
977 scan_all_pmts_set = 1;
980 err = avformat_open_input(&ic, filename, file_iformat, &o->
g->
format_opts);
983 if (err == AVERROR_PROTOCOL_NOT_FOUND)
984 av_log(NULL, AV_LOG_ERROR,
"Did you mean file:%s?\n", filename);
987 if (scan_all_pmts_set)
988 av_dict_set(&o->
g->
format_opts,
"scan_all_pmts", NULL, AV_DICT_MATCH_CASE);
993 for (i = 0; i < ic->nb_streams; i++)
998 int orig_nb_streams = ic->nb_streams;
1002 ret = avformat_find_stream_info(ic, opts);
1004 for (i = 0; i < orig_nb_streams; i++)
1005 av_dict_free(&opts[i]);
1009 av_log(NULL, AV_LOG_FATAL,
"%s: could not find codec parameters\n", filename);
1010 if (ic->nb_streams == 0) {
1011 avformat_close_input(&ic);
1017 if (start_time != AV_NOPTS_VALUE && start_time_eof != AV_NOPTS_VALUE) {
1018 av_log(NULL, AV_LOG_WARNING,
"Cannot use -ss and -sseof both, using -ss for %s\n", filename);
1019 start_time_eof = AV_NOPTS_VALUE;
1022 if (start_time_eof != AV_NOPTS_VALUE) {
1023 if (start_time_eof >= 0) {
1024 av_log(NULL, AV_LOG_ERROR,
"-sseof value must be negative; aborting\n");
1027 if (ic->duration > 0) {
1028 start_time = start_time_eof + ic->duration;
1029 if (start_time < 0) {
1030 av_log(NULL, AV_LOG_WARNING,
"-sseof value seeks to before start of file %s; ignored\n", filename);
1031 start_time = AV_NOPTS_VALUE;
1034 av_log(NULL, AV_LOG_WARNING,
"Cannot use -sseof, duration of %s not known\n", filename);
1036 timestamp = (start_time == AV_NOPTS_VALUE) ? 0 : start_time;
1039 timestamp += ic->start_time;
1042 if (start_time != AV_NOPTS_VALUE) {
1043 int64_t seek_timestamp = timestamp;
1045 if (!(ic->iformat->flags & AVFMT_SEEK_TO_PTS)) {
1046 int dts_heuristic = 0;
1047 for (i=0; i<ic->nb_streams; i++) {
1048 const AVCodecParameters *par = ic->streams[i]->codecpar;
1049 if (par->video_delay) {
1054 if (dts_heuristic) {
1055 seek_timestamp -= 3*AV_TIME_BASE / 23;
1058 ret = avformat_seek_file(ic, -1, INT64_MIN, seek_timestamp, seek_timestamp, 0);
1060 av_log(NULL, AV_LOG_WARNING,
"%s: could not seek to position %0.3f\n",
1061 filename, (
double)timestamp / AV_TIME_BASE);
1079 d->time_base = (AVRational){ 1, 1 };
1083 av_log(NULL, AV_LOG_ERROR,
"Option -readrate for Input #%d is %0.3f; it must be non-negative.\n", f->
index, f->
readrate);
1087 av_log(NULL, AV_LOG_WARNING,
"Both -readrate and -re set for Input #%d. Using -readrate %0.3f.\n", f->
index, f->
readrate);
1097 av_dump_format(ic, f->
index, filename, 0);
1104 av_dict_set(&unused_opts, e->key, NULL, 0);
1108 while ((e = av_dict_iterate(unused_opts, e))) {
1109 const AVClass *
class = avcodec_get_class();
1110 const AVOption *option = av_opt_find(&
class, e->key, NULL, 0,
1111 AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
1112 const AVClass *fclass = avformat_get_class();
1113 const AVOption *foption = av_opt_find(&fclass, e->key, NULL, 0,
1114 AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
1115 if (!option || foption)
1119 if (!(option->flags & AV_OPT_FLAG_DECODING_PARAM)) {
1120 av_log(NULL, AV_LOG_ERROR,
"Codec AVOption %s (%s) specified for "
1121 "input file #%d (%s) is not a decoding option.\n", e->key,
1122 option->help ? option->help :
"", f->
index,
1127 av_log(NULL, AV_LOG_WARNING,
"Codec AVOption %s (%s) specified for "
1128 "input file #%d (%s) has not been used for any stream. The most "
1129 "likely reason is either wrong type (e.g. a video option with "
1130 "no video streams) or that it is a private option of some decoder "
1131 "which was not actually used for any stream.\n", e->key,
1132 option->help ? option->help :
"", f->
index, filename);
1134 av_dict_free(&unused_opts);
1139 for (j = 0; j < ic->nb_streams; j++) {
1140 AVStream *st = ic->streams[j];
AVThreadMessageQueue * in_thread_queue
AVDictionary * codec_opts
AVDictionary * format_opts
SpecifierOpt * frame_pix_fmts
SpecifierOpt * dump_attachment
SpecifierOpt * audio_sample_rate
SpecifierOpt * frame_sizes
SpecifierOpt * audio_channels
SpecifierOpt * frame_rates
SpecifierOpt * audio_ch_layouts