int ret, size;
uint8_t *buf;
- if (!st || mov->fc->flags & AVFMT_FLAG_BITEXACT)
+ if (!st)
return 0;
ret = avio_open_dyn_buf(&pb_buf);
mov_write_string_metadata(s, pb, "\251wrt", "composer" , 1);
mov_write_string_metadata(s, pb, "\251alb", "album" , 1);
mov_write_string_metadata(s, pb, "\251day", "date" , 1);
- if (!mov->exact &&
- !mov_write_string_metadata(s, pb, "\251too", "encoding_tool", 1))
- mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1);
+ if (!mov_write_string_metadata(s, pb, "\251too", "encoding_tool", 1)) {
+ if (!(s->flags & AVFMT_FLAG_BITEXACT))
+ mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1);
+ }
mov_write_string_metadata(s, pb, "\251cmt", "comment" , 1);
mov_write_string_metadata(s, pb, "\251gen", "genre" , 1);
mov_write_string_metadata(s, pb, "\251cpy", "copyright", 1);
static int mov_write_uuidusmt_tag(AVIOContext *pb, AVFormatContext *s)
{
- MOVMuxContext *mov = s->priv_data;
AVDictionaryEntry *title = av_dict_get(s->metadata, "title", NULL, 0);
int64_t pos, pos2;
avio_wb16(pb, 0x0); /* ? */
avio_wb16(pb, 0x021C); /* data */
- if (!mov->exact)
+ if (!(s->flags & AVFMT_FLAG_BITEXACT))
mov_write_psp_udta_tag(pb, LIBAVCODEC_IDENT, "eng", 0x04);
mov_write_psp_udta_tag(pb, title->value, "eng", 0x01);
mov_write_psp_udta_tag(pb, "2006/04/01 11:11:11", "und", 0x03);
avio_printf(pb, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
avio_printf(pb, "<smil xmlns=\"http://www.w3.org/2001/SMIL20/Language\">\n");
avio_printf(pb, "<head>\n");
- if (!mov->exact)
+ if (!(mov->fc->flags & AVFMT_FLAG_BITEXACT))
avio_printf(pb, "<meta name=\"creator\" content=\"%s\" />\n",
LIBAVFORMAT_IDENT);
avio_printf(pb, "</head>\n");
else if (!strcmp("f4v", s->oformat->name)) mov->mode = MODE_F4V;
}
- if (s->flags & AVFMT_FLAG_BITEXACT)
- mov->exact = 1;
-
if (mov->flags & FF_MOV_FLAG_DELAY_MOOV)
mov->flags |= FF_MOV_FLAG_EMPTY_MOOV;
mov_write_mdat_tag(pb, mov);
}
- if (t = av_dict_get(s->metadata, "creation_time", NULL, 0))
+ if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) {
mov->time = ff_iso8601_to_unix_time(t->value);
+ if (mov->time < 0) {
+ av_log(s, AV_LOG_WARNING, "Failed to parse creation_time %s\n", t->value);
+ mov->time = 0;
+ }
+ }
if (mov->time)
mov->time += 0x7C25B080; // 1970 based -> 1904 based
AVOutputFormat ff_mp4_muxer = {
.name = "mp4",
.long_name = NULL_IF_CONFIG_SMALL("MP4 (MPEG-4 Part 14)"),
- .mime_type = "application/mp4",
+ .mime_type = "video/mp4",
.extensions = "mp4",
.priv_data_size = sizeof(MOVMuxContext),
.audio_codec = AV_CODEC_ID_AAC,
AVOutputFormat ff_ipod_muxer = {
.name = "ipod",
.long_name = NULL_IF_CONFIG_SMALL("iPod H.264 MP4 (MPEG-4 Part 14)"),
- .mime_type = "application/mp4",
+ .mime_type = "video/mp4",
.extensions = "m4v,m4a",
.priv_data_size = sizeof(MOVMuxContext),
.audio_codec = AV_CODEC_ID_AAC,
AVOutputFormat ff_ismv_muxer = {
.name = "ismv",
.long_name = NULL_IF_CONFIG_SMALL("ISMV/ISMA (Smooth Streaming)"),
- .mime_type = "application/mp4",
+ .mime_type = "video/mp4",
.extensions = "ismv,isma",
.priv_data_size = sizeof(MOVMuxContext),
.audio_codec = AV_CODEC_ID_AAC,