summaryrefslogtreecommitdiff
path: root/libavformat/riff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-22 12:04:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-22 12:20:04 +0200
commit52e40155a8e1f41b2d97e5832022263b77752f32 (patch)
tree6a0e74576fa02d3794ba5110c84130a2884841c1 /libavformat/riff.c
parent369e5dcfc530576293998ea35137b8cc35aee412 (diff)
parente544782623caf1eb4b2429e9c4f35d6b627accba (diff)
Merge commit 'e544782623caf1eb4b2429e9c4f35d6b627accba'
* commit 'e544782623caf1eb4b2429e9c4f35d6b627accba': riff: Move guid structs and helper functions into riff Conflicts: libavformat/asf.h libavformat/riff.c libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/riff.c')
-rw-r--r--libavformat/riff.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 818ef55d98..9bc637262c 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -420,11 +420,11 @@ const AVCodecTag ff_codec_wav_tags[] = {
};
const AVCodecGuid ff_codec_wav_guids[] = {
- {AV_CODEC_ID_AC3, {0x2C,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
- {AV_CODEC_ID_ATRAC3P, {0xBF,0xAA,0x23,0xE9,0x58,0xCB,0x71,0x44,0xA1,0x19,0xFF,0xFA,0x01,0xE4,0xCE,0x62}},
- {AV_CODEC_ID_EAC3, {0xAF,0x87,0xFB,0xA7,0x02,0x2D,0xFB,0x42,0xA4,0xD4,0x05,0xCD,0x93,0x84,0x3B,0xDD}},
- {AV_CODEC_ID_MP2, {0x2B,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
- {AV_CODEC_ID_NONE}
+ { AV_CODEC_ID_AC3, { 0x2C, 0x80, 0x6D, 0xE0, 0x46, 0xDB, 0xCF, 0x11, 0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA } },
+ { AV_CODEC_ID_ATRAC3P, { 0xBF, 0xAA, 0x23, 0xE9, 0x58, 0xCB, 0x71, 0x44, 0xA1, 0x19, 0xFF, 0xFA, 0x01, 0xE4, 0xCE, 0x62 } },
+ { AV_CODEC_ID_EAC3, { 0xAF, 0x87, 0xFB, 0xA7, 0x02, 0x2D, 0xFB, 0x42, 0xA4, 0xD4, 0x05, 0xCD, 0x93, 0x84, 0x3B, 0xDD } },
+ { AV_CODEC_ID_MP2, { 0x2B, 0x80, 0x6D, 0xE0, 0x46, 0xDB, 0xCF, 0x11, 0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA } },
+ { AV_CODEC_ID_NONE }
};
const AVMetadataConv ff_riff_info_conv[] = {
@@ -443,6 +443,22 @@ const AVMetadataConv ff_riff_info_conv[] = {
{ 0 },
};
+void ff_get_guid(AVIOContext *s, ff_asf_guid *g)
+{
+ av_assert0(sizeof(*g) == 16); //compiler will optimize this out
+ if (avio_read(s, *g, sizeof(*g)) < (int)sizeof(*g))
+ memset(*g, 0, sizeof(*g));
+}
+
+enum AVCodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid)
+{
+ int i;
+ for (i = 0; guids[i].id != AV_CODEC_ID_NONE; i++)
+ if (!ff_guidcmp(guids[i].guid, guid))
+ return guids[i].id;
+ return AV_CODEC_ID_NONE;
+}
+
#if CONFIG_MUXERS
int64_t ff_start_tag(AVIOContext *pb, const char *tag)
{
@@ -841,23 +857,6 @@ int ff_get_bmp_header(AVIOContext *pb, AVStream *st, unsigned *esize)
return tag1;
}
-void ff_get_guid(AVIOContext *s, ff_asf_guid *g)
-{
- av_assert0(sizeof(*g) == 16); //compiler will optimize this out
- if (avio_read(s, *g, sizeof(*g)) < (int)sizeof(*g))
- memset(*g, 0, sizeof(*g));
-}
-
-enum AVCodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid)
-{
- int i;
- for (i = 0; guids[i].id != AV_CODEC_ID_NONE; i++) {
- if (!ff_guidcmp(guids[i].guid, guid))
- return guids[i].id;
- }
- return AV_CODEC_ID_NONE;
-}
-
int ff_read_riff_info(AVFormatContext *s, int64_t size)
{
int64_t start, end, cur;