48 if ((p->
buf[0] ==
'F' || p->
buf[0] ==
'C') && p->
buf[1] ==
'W' &&
63 if (tag ==
MKBETAG(
'C',
'W',
'S', 0)) {
67 if (tag !=
MKBETAG(
'F',
'W',
'S', 0))
72 len = (4 * nbits - 3 + 7) / 8;
124 int sample_rate_code;
139 ast->codec->channels = 1 + (v&1);
143 sample_rate_code= (v>>2) & 3;
144 if (!sample_rate_code)
145 ast->codec->sample_rate = 5512;
147 ast->codec->sample_rate = 11025 << (sample_rate_code-1);
static int swf_probe(AVProbeData *p)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int get_swf_tag(AVIOContext *pb, int *len_ptr)
AV_WL32 AV_WL24 AV_WL16 AV_RB32
int64_t pos
byte position in stream, -1 if unknown
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
int ctx_flags
Format-specific flags, see AVFMTCTX_xx.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
unsigned int avio_rb32(AVIOContext *s)
int id
format-specific stream ID
static int read_header(FFV1Context *f)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
AVInputFormat ff_swf_demuxer
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
int avio_r8(AVIOContext *s)
AVCodecContext * codec
codec context
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
unsigned int nb_streams
A list of all streams in the file.
struct AVRational AVRational
rational number numerator/denominator
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int read_probe(AVProbeData *p)
enum AVMediaType codec_type
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
static const AVCodecTag swf_codec_tags[]
This structure contains the data a format has to probe a file.
static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
unsigned int avio_rl16(AVIOContext *s)
#define MKBETAG(a, b, c, d)
int eof_reached
true if eof reached
void * priv_data
Format private data.
static const AVCodecTag swf_audio_codec_tags[]
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
preferred ID for decoding MPEG audio layer 1, 2 or 3