Commit 630c005b authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/flac_parser: export sample_rate also when PARSER_FLAG_COMPLETE_FRAMES is set

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ee3d03bf
......@@ -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;
......
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