[FFmpeg-devel] [PATCH 1/4] move ff_asf_guid, ff_guidcmp and ff_get_guid into riff.h

Peter Ross pross at xvid.org
Tue Apr 5 12:36:46 CEST 2011


---
 libavformat/asf.h    |   10 +---------
 libavformat/asfdec.c |    6 ------
 libavformat/riff.c   |    6 ++++++
 libavformat/riff.h   |    9 +++++++++
 4 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/libavformat/asf.h b/libavformat/asf.h
index 94c93d2..c3107f4 100644
--- a/libavformat/asf.h
+++ b/libavformat/asf.h
@@ -24,6 +24,7 @@
 #include <stdint.h>
 #include "avformat.h"
 #include "metadata.h"
+#include "riff.h"
 
 #define PACKET_SIZE 3200
 
@@ -46,8 +47,6 @@ typedef struct {
 
 } ASFStream;
 
-typedef uint8_t ff_asf_guid[16];
-
 typedef struct {
     ff_asf_guid guid;                  ///< generated by client computer
     uint64_t file_size;         /**< in bytes
@@ -173,11 +172,4 @@ extern const AVMetadataConv ff_asf_metadata_conv[];
 
 extern AVInputFormat ff_asf_demuxer;
 
-static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
-{
-    return memcmp(g1, g2, sizeof(ff_asf_guid));
-}
-
-void ff_get_guid(AVIOContext *s, ff_asf_guid *g);
-
 #endif /* AVFORMAT_ASF_H */
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 82cad56..d3fdf03 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -133,12 +133,6 @@ static void print_guid(const ff_asf_guid *g)
 #define print_guid(g)
 #endif
 
-void ff_get_guid(AVIOContext *s, ff_asf_guid *g)
-{
-    assert(sizeof(*g) == 16);
-    avio_read(s, *g, sizeof(*g));
-}
-
 static int asf_probe(AVProbeData *pd)
 {
     /* check file header */
diff --git a/libavformat/riff.c b/libavformat/riff.c
index fb8ab1c..b0a89de 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -584,3 +584,9 @@ void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssiz
     *au_scale /= gcd;
     *au_rate /= gcd;
 }
+
+void ff_get_guid(AVIOContext *s, ff_asf_guid *g)
+{
+    assert(sizeof(*g) == 16);
+    avio_read(s, *g, sizeof(*g));
+}
diff --git a/libavformat/riff.h b/libavformat/riff.h
index 5a45a38..c8a47e0 100644
--- a/libavformat/riff.h
+++ b/libavformat/riff.h
@@ -54,4 +54,13 @@ unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum CodecID id);
 enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag);
 void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale);
 
+typedef uint8_t ff_asf_guid[16];
+
+static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
+{
+    return memcmp(g1, g2, sizeof(ff_asf_guid));
+}
+
+void ff_get_guid(AVIOContext *s, ff_asf_guid *g);
+
 #endif /* AVFORMAT_RIFF_H */
-- 
1.7.4.1

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110405/a00ab160/attachment.asc>


More information about the ffmpeg-devel mailing list