FFmpeg
au.c
Go to the documentation of this file.
1 /*
2  * AU muxer and demuxer
3  * Copyright (c) 2001 Fabrice Bellard
4  *
5  * first version by Francois Revol <revol@free.fr>
6  *
7  * This file is part of FFmpeg.
8  *
9  * FFmpeg is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * FFmpeg is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with FFmpeg; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  */
23 
24 /*
25  * Reference documents:
26  * http://www.opengroup.org/public/pubs/external/auformat.html
27  * http://www.goice.co.jp/member/mo/formats/au.html
28  */
29 
30 #include "libavutil/bprint.h"
31 #include "avformat.h"
32 #include "internal.h"
33 #include "avio_internal.h"
34 #include "pcm.h"
35 #include "libavutil/avassert.h"
36 
37 /* if we don't know the size in advance */
38 #define AU_UNKNOWN_SIZE ((uint32_t)(~0))
39 
40 static const AVCodecTag codec_au_tags[] = {
41  { AV_CODEC_ID_PCM_MULAW, 1 },
42  { AV_CODEC_ID_PCM_S8, 2 },
43  { AV_CODEC_ID_PCM_S16BE, 3 },
44  { AV_CODEC_ID_PCM_S24BE, 4 },
45  { AV_CODEC_ID_PCM_S32BE, 5 },
46  { AV_CODEC_ID_PCM_F32BE, 6 },
47  { AV_CODEC_ID_PCM_F64BE, 7 },
52  { AV_CODEC_ID_PCM_ALAW, 27 },
53  { AV_CODEC_ID_ADPCM_G726LE, MKBETAG('7','2','6','2') },
54  { AV_CODEC_ID_NONE, 0 },
55 };
56 
57 static const AVCodecTag *const au_codec_tags[] = { codec_au_tags, NULL };
58 
59 #if CONFIG_AU_DEMUXER
60 
61 static int au_probe(const AVProbeData *p)
62 {
63  if (p->buf[0] == '.' && p->buf[1] == 's' &&
64  p->buf[2] == 'n' && p->buf[3] == 'd')
65  return AVPROBE_SCORE_MAX;
66  else
67  return 0;
68 }
69 
70 static int au_read_annotation(AVFormatContext *s, int size)
71 {
72  static const char keys[][7] = {
73  "title",
74  "artist",
75  "album",
76  "track",
77  "genre",
78  };
79  AVIOContext *pb = s->pb;
80  enum { PARSE_KEY, PARSE_VALUE, PARSE_FINISHED } state = PARSE_KEY;
81  char c;
82  AVBPrint bprint;
83  char * key = NULL;
84  char * value = NULL;
85  int ret, i;
86 
88 
89  while (size-- > 0) {
90  if (avio_feof(pb)) {
91  av_bprint_finalize(&bprint, NULL);
92  av_freep(&key);
93  return AVERROR_EOF;
94  }
95  c = avio_r8(pb);
96  switch(state) {
97  case PARSE_KEY:
98  if (c == '\0') {
99  state = PARSE_FINISHED;
100  } else if (c == '=') {
101  ret = av_bprint_finalize(&bprint, &key);
102  if (ret < 0)
103  return ret;
105  state = PARSE_VALUE;
106  } else {
107  av_bprint_chars(&bprint, c, 1);
108  }
109  break;
110  case PARSE_VALUE:
111  if (c == '\0' || c == '\n') {
112  if (av_bprint_finalize(&bprint, &value) != 0) {
113  av_log(s, AV_LOG_ERROR, "Memory error while parsing AU metadata.\n");
114  } else {
116  for (i = 0; i < FF_ARRAY_ELEMS(keys); i++) {
117  if (av_strcasecmp(keys[i], key) == 0) {
118  av_dict_set(&(s->metadata), keys[i], value, AV_DICT_DONT_STRDUP_VAL);
119  value = NULL;
120  break;
121  }
122  }
123  }
124  av_freep(&key);
125  av_freep(&value);
126  state = (c == '\0') ? PARSE_FINISHED : PARSE_KEY;
127  } else {
128  av_bprint_chars(&bprint, c, 1);
129  }
130  break;
131  case PARSE_FINISHED:
132  break;
133  default:
134  /* should never happen */
135  av_assert0(0);
136  }
137  }
138  av_bprint_finalize(&bprint, NULL);
139  av_freep(&key);
140  return 0;
141 }
142 
143 #define BLOCK_SIZE 1024
144 
145 static int au_read_header(AVFormatContext *s)
146 {
147  int size, data_size = 0;
148  unsigned int tag;
149  AVIOContext *pb = s->pb;
150  unsigned int id, channels, rate;
151  int bps, ba = 0;
152  enum AVCodecID codec;
153  AVStream *st;
154  int ret;
155 
156  tag = avio_rl32(pb);
157  if (tag != MKTAG('.', 's', 'n', 'd'))
158  return AVERROR_INVALIDDATA;
159  size = avio_rb32(pb); /* header size */
160  data_size = avio_rb32(pb); /* data size in bytes */
161 
162  if (data_size < 0 && data_size != AU_UNKNOWN_SIZE) {
163  av_log(s, AV_LOG_ERROR, "Invalid negative data size '%d' found\n", data_size);
164  return AVERROR_INVALIDDATA;
165  }
166 
167  id = avio_rb32(pb);
168  rate = avio_rb32(pb);
169  channels = avio_rb32(pb);
170 
171  if (size > 24) {
172  /* parse annotation field to get metadata */
173  ret = au_read_annotation(s, size - 24);
174  if (ret < 0)
175  return ret;
176  }
177 
178  codec = ff_codec_get_id(codec_au_tags, id);
179 
180  if (codec == AV_CODEC_ID_NONE) {
181  avpriv_request_sample(s, "unknown or unsupported codec tag: %u", id);
182  return AVERROR_PATCHWELCOME;
183  }
184 
185  bps = av_get_bits_per_sample(codec);
186  if (codec == AV_CODEC_ID_ADPCM_G726LE) {
187  if (id == MKBETAG('7','2','6','2')) {
188  bps = 2;
189  } else {
190  const uint8_t bpcss[] = {4, 0, 3, 5};
191  av_assert0(id >= 23 && id < 23 + 4);
192  ba = bpcss[id - 23];
193  bps = bpcss[id - 23];
194  }
195  } else if (!bps) {
196  avpriv_request_sample(s, "Unknown bits per sample");
197  return AVERROR_PATCHWELCOME;
198  }
199 
200  if (channels == 0 || channels >= INT_MAX / (BLOCK_SIZE * bps >> 3)) {
201  av_log(s, AV_LOG_ERROR, "Invalid number of channels %u\n", channels);
202  return AVERROR_INVALIDDATA;
203  }
204 
205  if (rate == 0 || rate > INT_MAX) {
206  av_log(s, AV_LOG_ERROR, "Invalid sample rate: %u\n", rate);
207  return AVERROR_INVALIDDATA;
208  }
209 
210  st = avformat_new_stream(s, NULL);
211  if (!st)
212  return AVERROR(ENOMEM);
214  st->codecpar->codec_tag = id;
215  st->codecpar->codec_id = codec;
216  st->codecpar->channels = channels;
217  st->codecpar->sample_rate = rate;
219  st->codecpar->bit_rate = channels * rate * bps;
220  st->codecpar->block_align = ba ? ba : FFMAX(bps * st->codecpar->channels / 8, 1);
221  if (data_size != AU_UNKNOWN_SIZE)
222  st->duration = (((int64_t)data_size)<<3) / (st->codecpar->channels * (int64_t)bps);
223 
224  st->start_time = 0;
225  avpriv_set_pts_info(st, 64, 1, rate);
226 
227  return 0;
228 }
229 
231  .name = "au",
232  .long_name = NULL_IF_CONFIG_SMALL("Sun AU"),
233  .read_probe = au_probe,
234  .read_header = au_read_header,
235  .read_packet = ff_pcm_read_packet,
236  .read_seek = ff_pcm_read_seek,
237  .codec_tag = au_codec_tags,
238 };
239 
240 #endif /* CONFIG_AU_DEMUXER */
241 
242 #if CONFIG_AU_MUXER
243 
244 typedef struct AUContext {
245  uint32_t header_size;
246 } AUContext;
247 
248 #include "rawenc.h"
249 
250 static int au_get_annotations(AVFormatContext *s, AVBPrint *annotations)
251 {
252  static const char keys[][7] = {
253  "Title",
254  "Artist",
255  "Album",
256  "Track",
257  "Genre",
258  };
259  int cnt = 0;
260  AVDictionary *m = s->metadata;
261  AVDictionaryEntry *t = NULL;
262 
263  for (int i = 0; i < FF_ARRAY_ELEMS(keys); i++) {
264  t = av_dict_get(m, keys[i], NULL, 0);
265  if (t != NULL) {
266  if (cnt++)
267  av_bprint_chars(annotations, '\n', 1);
268  av_bprintf(annotations, "%s=%s", keys[i], t->value);
269  }
270  }
271  /* The specification requires the annotation field to be zero-terminated
272  * and its length to be a multiple of eight, so pad with 0's */
273  av_bprint_chars(annotations, '\0', 8);
274  return av_bprint_is_complete(annotations) ? 0 : AVERROR(ENOMEM);
275 }
276 
277 static int au_write_header(AVFormatContext *s)
278 {
279  int ret;
280  AUContext *au = s->priv_data;
281  AVIOContext *pb = s->pb;
282  AVCodecParameters *par = s->streams[0]->codecpar;
283  AVBPrint annotations;
284 
285  if (s->nb_streams != 1) {
286  av_log(s, AV_LOG_ERROR, "only one stream is supported\n");
287  return AVERROR(EINVAL);
288  }
289 
291  if (!par->codec_tag) {
292  av_log(s, AV_LOG_ERROR, "unsupported codec\n");
293  return AVERROR(EINVAL);
294  }
295 
296  av_bprint_init(&annotations, 0, INT_MAX - 24);
297  ret = au_get_annotations(s, &annotations);
298  if (ret < 0)
299  goto fail;
300  au->header_size = 24 + annotations.len & ~7;
301 
302  ffio_wfourcc(pb, ".snd"); /* magic number */
303  avio_wb32(pb, au->header_size); /* header size */
304  avio_wb32(pb, AU_UNKNOWN_SIZE); /* data size */
305  avio_wb32(pb, par->codec_tag); /* codec ID */
306  avio_wb32(pb, par->sample_rate);
307  avio_wb32(pb, par->channels);
308  avio_write(pb, annotations.str, annotations.len & ~7);
309 
310 fail:
311  av_bprint_finalize(&annotations, NULL);
312 
313  return ret;
314 }
315 
316 static int au_write_trailer(AVFormatContext *s)
317 {
318  AVIOContext *pb = s->pb;
319  AUContext *au = s->priv_data;
320  int64_t file_size = avio_tell(pb);
321 
322  if ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) && file_size < INT32_MAX) {
323  /* update file size */
324  avio_seek(pb, 8, SEEK_SET);
325  avio_wb32(pb, (uint32_t)(file_size - au->header_size));
326  avio_seek(pb, file_size, SEEK_SET);
327  }
328 
329  return 0;
330 }
331 
332 const AVOutputFormat ff_au_muxer = {
333  .name = "au",
334  .long_name = NULL_IF_CONFIG_SMALL("Sun AU"),
335  .mime_type = "audio/basic",
336  .extensions = "au",
337  .priv_data_size = sizeof(AUContext),
338  .audio_codec = AV_CODEC_ID_PCM_S16BE,
339  .video_codec = AV_CODEC_ID_NONE,
340  .write_header = au_write_header,
342  .write_trailer = au_write_trailer,
343  .codec_tag = au_codec_tags,
345 };
346 
347 #endif /* CONFIG_AU_MUXER */
AV_BPRINT_SIZE_UNLIMITED
#define AV_BPRINT_SIZE_UNLIMITED
AV_CODEC_ID_PCM_F32BE
@ AV_CODEC_ID_PCM_F32BE
Definition: codec_id.h:334
codec_au_tags
static const AVCodecTag codec_au_tags[]
Definition: au.c:40
ff_au_demuxer
const AVInputFormat ff_au_demuxer
AVOutputFormat::name
const char * name
Definition: avformat.h:504
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
avformat_new_stream
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
Definition: utils.c:768
pcm.h
AVCodecParameters::codec_type
enum AVMediaType codec_type
General type of the encoded data.
Definition: codec_par.h:56
ffio_wfourcc
static av_always_inline void ffio_wfourcc(AVIOContext *pb, const uint8_t *s)
Definition: avio_internal.h:116
av_bprint_finalize
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
Definition: bprint.c:234
av_bprint_init
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
Definition: bprint.c:68
AVCodecParameters
This struct describes the properties of an encoded stream.
Definition: codec_par.h:52
AVERROR_EOF
#define AVERROR_EOF
End of file.
Definition: error.h:57
AVFMT_NOTIMESTAMPS
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition: avformat.h:475
av_strcasecmp
int av_strcasecmp(const char *a, const char *b)
Locale-independent case-insensitive compare.
Definition: avstring.c:215
AV_CODEC_ID_ADPCM_G722
@ AV_CODEC_ID_ADPCM_G722
Definition: codec_id.h:381
AVCodecParameters::codec_tag
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
Definition: codec_par.h:64
AVDictionary
Definition: dict.c:30
FFMAX
#define FFMAX(a, b)
Definition: macros.h:47
au_codec_tags
static const AVCodecTag *const au_codec_tags[]
Definition: au.c:57
AVPROBE_SCORE_MAX
#define AVPROBE_SCORE_MAX
maximum score
Definition: avformat.h:459
AVCodecParameters::channels
int channels
Audio only.
Definition: codec_par.h:166
AV_CODEC_ID_PCM_S16BE
@ AV_CODEC_ID_PCM_S16BE
Definition: codec_id.h:315
fail
#define fail()
Definition: checkasm.h:127
avio_tell
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
Definition: avio.h:504
AVStream::duration
int64_t duration
Decoding: duration of the stream, in stream time base.
Definition: avformat.h:985
AV_DICT_DONT_STRDUP_VAL
#define AV_DICT_DONT_STRDUP_VAL
Take ownership of a value that's been allocated with av_malloc() or another memory allocation functio...
Definition: dict.h:72
av_get_bits_per_sample
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
Definition: utils.c:580
AV_CODEC_ID_PCM_S8
@ AV_CODEC_ID_PCM_S8
Definition: codec_id.h:318
avassert.h
avio_rb32
unsigned int avio_rb32(AVIOContext *s)
Definition: aviobuf.c:790
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
AVInputFormat
Definition: avformat.h:650
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
AVCodecTag
Definition: internal.h:51
av_dict_get
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
Definition: dict.c:40
s
#define s(width, name)
Definition: cbs_vp9.c:257
AVInputFormat::name
const char * name
A comma separated list of short names for the format.
Definition: avformat.h:655
AVProbeData::buf
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
Definition: avformat.h:449
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
av_assert0
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition: avassert.h:37
channels
channels
Definition: aptx.h:33
ff_raw_write_packet
int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: rawenc.c:29
AV_CODEC_ID_PCM_MULAW
@ AV_CODEC_ID_PCM_MULAW
Definition: codec_id.h:320
key
const char * key
Definition: hwcontext_opencl.c:168
AVFormatContext
Format I/O context.
Definition: avformat.h:1200
AV_CODEC_ID_PCM_ALAW
@ AV_CODEC_ID_PCM_ALAW
Definition: codec_id.h:321
internal.h
AVStream::codecpar
AVCodecParameters * codecpar
Codec parameters associated with this stream.
Definition: avformat.h:1095
NULL
#define NULL
Definition: coverity.c:32
AVERROR_PATCHWELCOME
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
Definition: error.h:64
write_trailer
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:98
AVProbeData
This structure contains the data a format has to probe a file.
Definition: avformat.h:447
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
AVCodecParameters::sample_rate
int sample_rate
Audio only.
Definition: codec_par.h:170
av_bprint_is_complete
static int av_bprint_is_complete(const AVBPrint *buf)
Test if the print buffer is complete (not truncated).
Definition: bprint.h:185
AVCodecID
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: codec_id.h:47
avio_rl32
unsigned int avio_rl32(AVIOContext *s)
Definition: aviobuf.c:759
AVIOContext
Bytestream IO Context.
Definition: avio.h:161
state
static struct @320 state
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
id
enum AVCodecID id
Definition: extract_extradata_bsf.c:325
ff_codec_get_id
enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
Definition: utils.c:357
bps
unsigned bps
Definition: movenc.c:1597
size
int size
Definition: twinvq_data.h:10344
MKBETAG
#define MKBETAG(a, b, c, d)
Definition: macros.h:56
avio_write
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
Definition: aviobuf.c:232
avio_wb32
void avio_wb32(AVIOContext *s, unsigned int val)
Definition: aviobuf.c:394
avio_r8
int avio_r8(AVIOContext *s)
Definition: aviobuf.c:632
rawenc.h
write_packet
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:727
bprint.h
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:48
AVOutputFormat
Definition: avformat.h:503
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:271
avio_internal.h
AVCodecParameters::block_align
int block_align
Audio only.
Definition: codec_par.h:177
AV_CODEC_ID_PCM_F64BE
@ AV_CODEC_ID_PCM_F64BE
Definition: codec_id.h:336
value
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
Definition: writing_filters.txt:86
AV_CODEC_ID_PCM_S32BE
@ AV_CODEC_ID_PCM_S32BE
Definition: codec_id.h:323
ff_pcm_read_packet
int ff_pcm_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: pcm.c:29
tag
uint32_t tag
Definition: movenc.c:1596
ret
ret
Definition: filter_design.txt:187
AVStream
Stream structure.
Definition: avformat.h:935
avio_seek
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
Definition: aviobuf.c:260
ff_pcm_read_seek
int ff_pcm_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: pcm.c:56
avformat.h
av_bprintf
void av_bprintf(AVBPrint *buf, const char *fmt,...)
Definition: bprint.c:93
AV_CODEC_ID_ADPCM_G726LE
@ AV_CODEC_ID_ADPCM_G726LE
Definition: codec_id.h:388
AVIO_SEEKABLE_NORMAL
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
Definition: avio.h:40
ff_codec_get_tag
unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id)
Definition: utils.c:347
AU_UNKNOWN_SIZE
#define AU_UNKNOWN_SIZE
Definition: au.c:38
avpriv_set_pts_info
void avpriv_set_pts_info(AVStream *st, int pts_wrap_bits, unsigned int pts_num, unsigned int pts_den)
Set the time base and wrapping info for a given stream.
Definition: utils.c:1196
AVCodecParameters::bits_per_coded_sample
int bits_per_coded_sample
The number of bits per sample in the codedwords.
Definition: codec_par.h:102
ff_au_muxer
const AVOutputFormat ff_au_muxer
avpriv_request_sample
#define avpriv_request_sample(...)
Definition: tableprint_vlc.h:37
AVDictionaryEntry
Definition: dict.h:79
AVCodecParameters::codec_id
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
Definition: codec_par.h:60
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:35
av_dict_set
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
Definition: dict.c:70
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
AVCodecParameters::bit_rate
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
Definition: codec_par.h:89
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:28
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
MKTAG
#define MKTAG(a, b, c, d)
Definition: macros.h:55
BLOCK_SIZE
#define BLOCK_SIZE
Definition: adx.h:53
AVDictionaryEntry::value
char * value
Definition: dict.h:81
AVStream::start_time
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
Definition: avformat.h:975
write_header
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:347
AV_CODEC_ID_PCM_S24BE
@ AV_CODEC_ID_PCM_S24BE
Definition: codec_id.h:327
av_bprint_chars
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.
Definition: bprint.c:139
avio_feof
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
Definition: aviobuf.c:375