From 23e303859aa93572f00b17e3b2bc0a552ad7c348 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 11 Jul 2013 19:15:09 +0200 Subject: mplayer: fix incorrect audio sync after format changes This is not directly related to the handling of format changes itself, but playing audio normally after the change. This was broken: the output byte rate was not recalculated, so audio-video sync was simply broken. Fix this by calculating the byte rate on the fly, instead of storing it in sh_audio. Format changes are relatively common (switches between stereo and 5.1 in TV recordings), so this fixes a somewhat critical bug. --- demux/stheader.h | 1 - 1 file changed, 1 deletion(-) (limited to 'demux') diff --git a/demux/stheader.h b/demux/stheader.h index 8b584396ca..447cacfc02 100644 --- a/demux/stheader.h +++ b/demux/stheader.h @@ -92,7 +92,6 @@ typedef struct sh_audio { int container_out_samplerate; int samplesize; struct mp_chmap channels; - int o_bps; // == samplerate*samplesize*channels.num (uncompr. bytes/sec) int i_bps; // == bitrate (compressed bytes/sec) // decoder buffers: int audio_out_minsize; // minimal output from decoder may be this much -- cgit v1.2.3