Commit cffd2713 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'acc897e6'

* commit 'acc897e6':
  lavc: make avpriv_flac_is_extradata_valid() private on the next bump
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 94fe404c acc897e6
...@@ -166,7 +166,7 @@ int ff_flac_get_max_frame_size(int blocksize, int ch, int bps) ...@@ -166,7 +166,7 @@ int ff_flac_get_max_frame_size(int blocksize, int ch, int bps)
return count; return count;
} }
int avpriv_flac_is_extradata_valid(AVCodecContext *avctx, int ff_flac_is_extradata_valid(AVCodecContext *avctx,
enum FLACExtradataFormat *format, enum FLACExtradataFormat *format,
uint8_t **streaminfo_start) uint8_t **streaminfo_start)
{ {
...@@ -242,4 +242,11 @@ void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo * ...@@ -242,4 +242,11 @@ void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *
{ {
ff_flac_parse_streaminfo(avctx, s, buffer); ff_flac_parse_streaminfo(avctx, s, buffer);
} }
int avpriv_flac_is_extradata_valid(AVCodecContext *avctx,
enum FLACExtradataFormat *format,
uint8_t **streaminfo_start)
{
return ff_flac_is_extradata_valid(avctx, format, streaminfo_start);
}
#endif #endif
...@@ -102,6 +102,9 @@ void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s, ...@@ -102,6 +102,9 @@ void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
#if LIBAVCODEC_VERSION_MAJOR < 57 #if LIBAVCODEC_VERSION_MAJOR < 57
void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s, void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
const uint8_t *buffer); const uint8_t *buffer);
int avpriv_flac_is_extradata_valid(AVCodecContext *avctx,
enum FLACExtradataFormat *format,
uint8_t **streaminfo_start);
#endif #endif
/** /**
...@@ -111,9 +114,9 @@ void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo * ...@@ -111,9 +114,9 @@ void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *
* @param[out] streaminfo_start pointer to start of 34-byte STREAMINFO data. * @param[out] streaminfo_start pointer to start of 34-byte STREAMINFO data.
* @return 1 if valid, 0 if not valid. * @return 1 if valid, 0 if not valid.
*/ */
int avpriv_flac_is_extradata_valid(AVCodecContext *avctx, int ff_flac_is_extradata_valid(AVCodecContext *avctx,
enum FLACExtradataFormat *format, enum FLACExtradataFormat *format,
uint8_t **streaminfo_start); uint8_t **streaminfo_start);
/** /**
* Calculate an estimate for the maximum frame size based on verbatim mode. * Calculate an estimate for the maximum frame size based on verbatim mode.
......
...@@ -102,7 +102,7 @@ static av_cold int flac_decode_init(AVCodecContext *avctx) ...@@ -102,7 +102,7 @@ static av_cold int flac_decode_init(AVCodecContext *avctx)
if (!avctx->extradata) if (!avctx->extradata)
return 0; return 0;
if (!avpriv_flac_is_extradata_valid(avctx, &format, &streaminfo)) if (!ff_flac_is_extradata_valid(avctx, &format, &streaminfo))
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
/* initialize based on the demuxer-supplied streamdata header */ /* initialize based on the demuxer-supplied streamdata header */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment