summaryrefslogtreecommitdiff
path: root/libavcodec/dca.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-10-31 00:36:32 -0300
committerJames Almer <jamrial@gmail.com>2017-11-01 18:36:53 -0300
commit3df4939988ace682f7ac0366ef8fd700d207e6b6 (patch)
tree309709c0eb5b1e4f98d79a9d5f705609f8bff2cb /libavcodec/dca.h
parent2b739e1cb8f6ce8baead03ce5c999103ba78f24f (diff)
avcodec/dca: return standard error codes in avpriv_dca_parse_core_frame_header()
This prevents making the DCAParseError enum part of the ABI. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: foo86 <foobaz86@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/dca.h')
-rw-r--r--libavcodec/dca.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/libavcodec/dca.h b/libavcodec/dca.h
index c70598af92..dcc7c7b395 100644
--- a/libavcodec/dca.h
+++ b/libavcodec/dca.h
@@ -46,7 +46,6 @@ enum DCAParseError {
DCA_PARSE_ERROR_RESERVED_BIT = -7,
DCA_PARSE_ERROR_LFE_FLAG = -8,
DCA_PARSE_ERROR_PCM_RES = -9,
- DCA_PARSE_ERROR_INVALIDDATA = -10,
};
typedef struct DCACoreFrameHeader {
@@ -211,10 +210,19 @@ int avpriv_dca_convert_bitstream(const uint8_t *src, int src_size, uint8_t *dst,
/**
* Parse and validate core frame header
- * @return 0 on success, negative DCA_PARSE_ERROR_ code on failure
+ * @param[out] h Pointer to struct where header info is written.
+ * @param[in] buf Pointer to the data buffer
+ * @param[in] size Size of the data buffer
+ * @return 0 on success, negative AVERROR code on failure
*/
int avpriv_dca_parse_core_frame_header(DCACoreFrameHeader *h, const uint8_t *buf, int size);
+/**
+ * Parse and validate core frame header
+ * @param[out] h Pointer to struct where header info is written.
+ * @param[in] gbc BitContext containing the first 120 bits of the frame.
+ * @return 0 on success, negative DCA_PARSE_ERROR_ code on failure
+ */
int ff_dca_parse_core_frame_header(DCACoreFrameHeader *h, GetBitContext *gb);
#endif /* AVCODEC_DCA_H */