* Add Matroska Video (.mkv) support.

This commit is contained in:
Justin Maggard 2009-03-27 07:39:09 +00:00
parent 7372543da9
commit 9854e35533
2 changed files with 5 additions and 1 deletions

View File

@ -842,6 +842,10 @@ GetVideoMetadata(const char * path, char * name)
asprintf(&m.mime, "video/x-ms-wmv");
else if( strcmp(ctx->iformat->name, "mov,mp4,m4a,3gp,3g2,mj2") == 0 )
asprintf(&m.mime, "video/mp4");
else if( strcmp(ctx->iformat->name, "matroska") == 0 )
asprintf(&m.mime, "video/x-matroska");
else
DPRINTF(E_WARN, L_METADATA, "Unhandled format: %s\n", ctx->iformat->name);
}
av_close_input_file(ctx);

View File

@ -49,7 +49,7 @@ is_video(const char * file)
ends_with(file, ".asf") || ends_with(file, ".wmv") ||
ends_with(file, ".mp4") || ends_with(file, ".m4v") ||
ends_with(file, ".mts") || ends_with(file, ".m2ts") ||
ends_with(file, ".m2t") ||
ends_with(file, ".m2t") || ends_with(file, ".mkv") ||
ends_with(file, ".vob") || ends_with(file, ".ts") ||
ends_with(file, ".avi") || ends_with(file, ".xvid"));
}