Revision c1309b27

View differences:

libavformat/asf.h
24 24
#include <stdint.h>
25 25
#include "avformat.h"
26 26
#include "metadata.h"
27
#include "riff.h"
27 28

  
28 29
#define PACKET_SIZE 3200
29 30

  
......
46 47

  
47 48
} ASFStream;
48 49

  
49
typedef uint8_t ff_asf_guid[16];
50

  
51 50
typedef struct {
52 51
    ff_asf_guid guid;                  ///< generated by client computer
53 52
    uint64_t file_size;         /**< in bytes
......
173 172

  
174 173
extern AVInputFormat ff_asf_demuxer;
175 174

  
176
static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
177
{
178
    return memcmp(g1, g2, sizeof(ff_asf_guid));
179
}
180

  
181
void ff_get_guid(AVIOContext *s, ff_asf_guid *g);
182

  
183 175
#endif /* AVFORMAT_ASF_H */
libavformat/asfdec.c
133 133
#define print_guid(g)
134 134
#endif
135 135

  
136
void ff_get_guid(AVIOContext *s, ff_asf_guid *g)
137
{
138
    assert(sizeof(*g) == 16);
139
    avio_read(s, *g, sizeof(*g));
140
}
141

  
142 136
static int asf_probe(AVProbeData *pd)
143 137
{
144 138
    /* check file header */
libavformat/riff.c
584 584
    *au_scale /= gcd;
585 585
    *au_rate /= gcd;
586 586
}
587

  
588
void ff_get_guid(AVIOContext *s, ff_asf_guid *g)
589
{
590
    assert(sizeof(*g) == 16);
591
    avio_read(s, *g, sizeof(*g));
592
}
libavformat/riff.h
54 54
enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag);
55 55
void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale);
56 56

  
57
typedef uint8_t ff_asf_guid[16];
58

  
59
static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
60
{
61
    return memcmp(g1, g2, sizeof(ff_asf_guid));
62
}
63

  
64
void ff_get_guid(AVIOContext *s, ff_asf_guid *g);
65

  
57 66
#endif /* AVFORMAT_RIFF_H */

Also available in: Unified diff