mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 18:07:31 +09:00
[ffvpx] Update ffvp9/ffvp8 to 3.4.2-release
Structure of code was slightly modified so that it should be no longer necessary to re-generate the config_*.h files, greatly simplifying the resync process in the future.
This commit is contained in:
parent
705e180aea
commit
d1361d3c21
183 changed files with 17773 additions and 28489 deletions
|
|
@ -201,7 +201,7 @@ void ff_flac_set_channel_layout(AVCodecContext *avctx)
|
|||
avctx->channel_layout = 0;
|
||||
}
|
||||
|
||||
void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
|
||||
int ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
|
||||
const uint8_t *buffer)
|
||||
{
|
||||
GetBitContext gb;
|
||||
|
|
@ -213,6 +213,7 @@ void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
|
|||
av_log(avctx, AV_LOG_WARNING, "invalid max blocksize: %d\n",
|
||||
s->max_blocksize);
|
||||
s->max_blocksize = 16;
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
skip_bits(&gb, 24); /* skip min frame size */
|
||||
|
|
@ -222,6 +223,12 @@ void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
|
|||
s->channels = get_bits(&gb, 3) + 1;
|
||||
s->bps = get_bits(&gb, 5) + 1;
|
||||
|
||||
if (s->bps < 4) {
|
||||
av_log(avctx, AV_LOG_ERROR, "invalid bps: %d\n", s->bps);
|
||||
s->bps = 16;
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
avctx->channels = s->channels;
|
||||
avctx->sample_rate = s->samplerate;
|
||||
avctx->bits_per_raw_sample = s->bps;
|
||||
|
|
@ -234,4 +241,6 @@ void ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
|
|||
|
||||
skip_bits_long(&gb, 64); /* md5 sum */
|
||||
skip_bits_long(&gb, 64); /* md5 sum */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue