57 if ((p->
buf[0] ==
'F' || p->
buf[0] ==
'C') && p->
buf[1] ==
'W' &&
72 if (tag ==
MKBETAG(
'C',
'W',
'S', 0)) {
76 if (tag !=
MKBETAG(
'F',
'W',
'S', 0))
81 len = (4 * nbits - 3 + 7) / 8;
96 int tag,
len, i, frame, v, res;
132 int sample_rate_code;
148 ast->codec->channels = 2;
151 ast->codec->channels = 1;
155 ast->codec->codec_id =
ff_codec_get_id(swf_audio_codec_tags, (v>>4) & 15);
157 sample_rate_code= (v>>2) & 3;
158 ast->codec->sample_rate = 44100 >> (3 - sample_rate_code);
const AVCodecTag ff_swf_codec_tags[]
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)
int64_t pos
byte position in stream, -1 if unknown
#define AV_CH_LAYOUT_STEREO
int ctx_flags
Flags signalling stream properties.
unsigned int avio_rb32(AVIOContext *s)
int id
Format-specific stream ID.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
AVStream ** streams
A list of all streams in the file.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
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. ...
preferred ID for decoding MPEG audio layer 1, 2 or 3
void av_log(void *avcl, int level, const char *fmt,...)
int avio_r8(AVIOContext *s)
AVCodecContext * codec
Codec context associated with this stream.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
audio channel layout utility functions
static const AVCodecTag swf_audio_codec_tags[]
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int swf_read_header(AVFormatContext *s)
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
AVIOContext * pb
I/O context.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
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.
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...