mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
Merge commit 'c070a8751597e3aa1b443e88464da785d8966b14'
* commit 'c070a8751597e3aa1b443e88464da785d8966b14': lavc: make avpriv_flac_parse_streaminfo() private on the next bump Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
cfef947f7f
@ -201,7 +201,7 @@ void ff_flac_set_channel_layout(AVCodecContext *avctx)
|
|||||||
avctx->channel_layout = 0;
|
avctx->channel_layout = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
|
void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
|
||||||
const uint8_t *buffer)
|
const uint8_t *buffer)
|
||||||
{
|
{
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
@ -235,3 +235,11 @@ void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *
|
|||||||
skip_bits_long(&gb, 64); /* md5 sum */
|
skip_bits_long(&gb, 64); /* md5 sum */
|
||||||
skip_bits_long(&gb, 64); /* md5 sum */
|
skip_bits_long(&gb, 64); /* md5 sum */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LIBAVCODEC_VERSION_MAJOR < 57
|
||||||
|
void avpriv_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
|
||||||
|
const uint8_t *buffer)
|
||||||
|
{
|
||||||
|
ff_flac_parse_streaminfo(avctx, s, buffer);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@ -96,8 +96,13 @@ typedef struct FLACFrameInfo {
|
|||||||
* @param[out] s where parsed information is stored
|
* @param[out] s where parsed information is stored
|
||||||
* @param[in] buffer pointer to start of 34-byte streaminfo data
|
* @param[in] buffer pointer to start of 34-byte streaminfo data
|
||||||
*/
|
*/
|
||||||
|
void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
|
||||||
|
const uint8_t *buffer);
|
||||||
|
|
||||||
|
#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);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate the FLAC extradata.
|
* Validate the FLAC extradata.
|
||||||
|
@ -106,7 +106,7 @@ static av_cold int flac_decode_init(AVCodecContext *avctx)
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
/* initialize based on the demuxer-supplied streamdata header */
|
/* initialize based on the demuxer-supplied streamdata header */
|
||||||
avpriv_flac_parse_streaminfo(avctx, (FLACStreaminfo *)s, streaminfo);
|
ff_flac_parse_streaminfo(avctx, (FLACStreaminfo *)s, streaminfo);
|
||||||
ret = allocate_buffers(s);
|
ret = allocate_buffers(s);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
@ -168,7 +168,7 @@ static int parse_streaminfo(FLACContext *s, const uint8_t *buf, int buf_size)
|
|||||||
metadata_size != FLAC_STREAMINFO_SIZE) {
|
metadata_size != FLAC_STREAMINFO_SIZE) {
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
avpriv_flac_parse_streaminfo(s->avctx, (FLACStreaminfo *)s, &buf[8]);
|
ff_flac_parse_streaminfo(s->avctx, (FLACStreaminfo *)s, &buf[8]);
|
||||||
ret = allocate_buffers(s);
|
ret = allocate_buffers(s);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user