AVFormatContext* fc = (AVFormatContext*) ptr;
if(fc->iformat) return fc->iformat->name;
else if(fc->oformat) return fc->oformat->name;
- else return "NULL";
+ else return fc->av_class->class_name;
}
static void *format_child_next(void *obj, void *prev)
return ffio_open_whitelist(pb, url, flags, &s->interrupt_callback, options, s->protocol_whitelist, s->protocol_blacklist);
}
+#if FF_API_AVFORMAT_IO_CLOSE
void ff_format_io_close_default(AVFormatContext *s, AVIOContext *pb)
{
avio_close(pb);
}
+#endif
static int io_close2_default(AVFormatContext *s, AVIOContext *pb)
{
s = &si->pub;
s->av_class = &av_format_context_class;
s->io_open = io_open_default;
+#if FF_API_AVFORMAT_IO_CLOSE
+FF_DISABLE_DEPRECATION_WARNINGS
s->io_close = ff_format_io_close_default;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
s->io_close2= io_close2_default;
av_opt_set_defaults(s);
return NULL;
}
+#if FF_API_LAVF_SHORTEST
si->shortest_end = AV_NOPTS_VALUE;
+#endif
return s;
}
{ "clean_effects", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CLEAN_EFFECTS }, .unit = "disposition" },
{ "attached_pic", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_ATTACHED_PIC }, .unit = "disposition" },
{ "timed_thumbnails", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_TIMED_THUMBNAILS }, .unit = "disposition" },
+ { "non_diegetic", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_NON_DIEGETIC }, .unit = "disposition" },
{ "captions", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CAPTIONS }, .unit = "disposition" },
{ "descriptions", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DESCRIPTIONS }, .unit = "disposition" },
{ "metadata", .type = AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, .unit = "disposition" },
return NULL;
st = &sti->pub;
-#if FF_API_AVSTREAM_CLASS
st->av_class = &stream_class;
-#endif
-
st->codecpar = avcodec_parameters_alloc();
if (!st->codecpar)
goto fail;
st->sample_aspect_ratio = (AVRational) { 0, 1 };
+#if FF_API_AVSTREAM_SIDE_DATA
sti->inject_global_side_data = si->inject_global_side_data;
+#endif
sti->need_context_update = 1;