summaryrefslogtreecommitdiff
path: root/libavcodec/flac.h
diff options
context:
space:
mode:
authorMichael Chinen <mchinen@gmail.com>2010-12-07 13:30:18 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2010-12-07 13:30:18 +0000
commit625daac4bddda7858d16869c90ba7df95e7702c6 (patch)
tree5c888a88d3dc8f601bcdaf71d9b6c54d0b4ceca0 /libavcodec/flac.h
parent86b6e387cc16f873d2739af14f63696b648e0423 (diff)
Move decode_frame_header() from flacdec.c to flac.c/h to share with the
forthcoming FLAC parser. Patch by Michael Chinen [mchinen at gmail] Originally committed as revision 25909 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/flac.h')
-rw-r--r--libavcodec/flac.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/flac.h b/libavcodec/flac.h
index 1b114635ec..fe38463976 100644
--- a/libavcodec/flac.h
+++ b/libavcodec/flac.h
@@ -28,6 +28,7 @@
#define AVCODEC_FLAC_H
#include "avcodec.h"
+#include "get_bits.h"
#define FLAC_STREAMINFO_SIZE 34
#define FLAC_MAX_CHANNELS 8
@@ -120,4 +121,13 @@ void ff_flac_parse_block_header(const uint8_t *block_header,
*/
int ff_flac_get_max_frame_size(int blocksize, int ch, int bps);
+/**
+ * Validate and decode a frame header.
+ * @param avctx AVCodecContext to use as av_log() context
+ * @param gb GetBitContext from which to read frame header
+ * @param[out] fi frame information
+ * @return non-zero on error, 0 if ok
+ */
+int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
+ FLACFrameInfo *fi);
#endif /* AVCODEC_FLAC_H */