3rdparty/licenseReport: Add seperate LGPL checks
[haiku.git] / src / add-ons / media / plugins / ffmpeg / DemuxerTable.cpp
blobdcbebff43e8f3a4da79776da5f4043ada1a92977
1 /*
2 * Copyright 2009-2010 Stephan Aßmus <superstippi@gmx.de>
3 * All rights reserved. Distributed under the terms of the MIT license.
4 */
6 #include "DemuxerTable.h"
7 #include "MuxerTable.h"
9 extern "C" {
10 #include "avformat.h"
14 // NOTE: AVFormatReader uses this table only for better pretty names and
15 // the MIME type info, the latter which is unavailable from AVInputFormat.
18 const media_file_format*
19 demuxer_format_for(AVInputFormat* format)
21 for (uint32 i = 0; i < gMuxerCount; i++) {
22 const media_file_format* demuxerFormat = &gMuxerTable[i];
24 if (!(demuxerFormat->capabilities & media_file_format::B_READABLE))
25 continue;
27 if (strstr(format->name, demuxerFormat->short_name) != NULL)
28 return demuxerFormat;
30 return NULL;