static const int NTSC_samples_per_frame[] = { 1602, 1601, 1602, 1601, 1602, 0 };
static const int PAL_samples_per_frame[] = { 1920, 0 };
-AVOutputFormat mxf_d10_muxer;
+extern AVOutputFormat ff_mxf_d10_muxer;
#define EDIT_UNITS_PER_BODY 250
#define KAG_SIZE 512
}
}
}
- if (s->oformat != &mxf_d10_muxer)
+ if (s->oformat != &ff_mxf_d10_muxer)
sc->codec_ul = mxf_get_mpeg2_codec_ul(st->codec);
return !!sc->codec_ul;
}
static uint64_t mxf_parse_timestamp(time_t timestamp)
{
struct tm *time = gmtime(×tamp);
+ if (!time)
+ return 0;
return (uint64_t)(time->tm_year+1900) << 48 |
(uint64_t)(time->tm_mon+1) << 40 |
(uint64_t) time->tm_mday << 32 |
return -1;
}
av_set_pts_info(st, 64, mxf->time_base.num, mxf->time_base.den);
- if (s->oformat == &mxf_d10_muxer) {
+ if (s->oformat == &ff_mxf_d10_muxer) {
if (st->codec->bit_rate == 50000000)
if (mxf->time_base.den == 25) sc->index = 3;
else sc->index = 5;
return -1;
}
av_set_pts_info(st, 64, 1, st->codec->sample_rate);
- if (s->oformat == &mxf_d10_muxer) {
+ if (s->oformat == &ff_mxf_d10_muxer) {
if (st->index != 1) {
av_log(s, AV_LOG_ERROR, "MXF D-10 only support one audio track\n");
return -1;
present[sc->index]++;
}
- if (s->oformat == &mxf_d10_muxer) {
+ if (s->oformat == &ff_mxf_d10_muxer) {
mxf->essence_container_count = 1;
}
mxf_write_klv_fill(s);
put_buffer(pb, sc->track_essence_element_key, 16); // write key
- if (s->oformat == &mxf_d10_muxer) {
+ if (s->oformat == &ff_mxf_d10_muxer) {
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
mxf_write_d10_video_packet(s, st, pkt);
else
mxf_interleave_get_packet, mxf_compare_timestamps);
}
-AVOutputFormat mxf_muxer = {
+AVOutputFormat ff_mxf_muxer = {
"mxf",
NULL_IF_CONFIG_SMALL("Material eXchange Format"),
"application/mxf",
mxf_interleave,
};
-AVOutputFormat mxf_d10_muxer = {
+AVOutputFormat ff_mxf_d10_muxer = {
"mxf_d10",
NULL_IF_CONFIG_SMALL("Material eXchange Format, D-10 Mapping"),
"application/mxf",