mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
avcodec/flac_parser: export sample_rate also when PARSER_FLAG_COMPLETE_FRAMES is set
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ee3d03bf4e
commit
630c005b87
@ -512,8 +512,11 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
|
||||
if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) {
|
||||
FLACFrameInfo fi;
|
||||
if (frame_header_is_valid(avctx, buf, &fi))
|
||||
if (frame_header_is_valid(avctx, buf, &fi)) {
|
||||
s->duration = fi.blocksize;
|
||||
if (!avctx->sample_rate)
|
||||
avctx->sample_rate = fi.samplerate;
|
||||
}
|
||||
*poutbuf = buf;
|
||||
*poutbuf_size = buf_size;
|
||||
return buf_size;
|
||||
|
Loading…
Reference in New Issue
Block a user