You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02: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:
		| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user