You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	dca: set AVCodecContext frame_size for DTS audio
Set the frame size when decoding DTS audio. This has the side effect of fixing the computation of timestamps for DTS-HD in compute_pkt_fields. Since frame_size is not currently set, the duration of a frame is being guessed based on the streams bitrate. But for DTS-HD, the bitrate currently used is the rate of the DTS core which is much different than the whole DTS-HD stream and leads to a wildly inaccurate frame duration estimate. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
		
				
					committed by
					
						 Ronald S. Bultje
						Ronald S. Bultje
					
				
			
			
				
	
			
			
			
						parent
						
							3c7c16fde3
						
					
				
				
					commit
					49c7006c7e
				
			| @@ -1650,6 +1650,7 @@ static int dca_decode_frame(AVCodecContext * avctx, | ||||
|     //set AVCodec values with parsed data | ||||
|     avctx->sample_rate = s->sample_rate; | ||||
|     avctx->bit_rate = s->bit_rate; | ||||
|     avctx->frame_size = s->sample_blocks * 32; | ||||
|  | ||||
|     s->profile = FF_PROFILE_DTS; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user