diff options
author | wm4 <wm4@nowhere> | 2013-07-11 19:15:09 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-11 19:15:09 +0200 |
commit | 23e303859aa93572f00b17e3b2bc0a552ad7c348 (patch) | |
tree | 155f4f429170b770e54bdd630886830168e220bc /demux | |
parent | 7a4f9cc4d2509a0d9afa68ea53ed97b72525d001 (diff) | |
download | mpv-23e303859aa93572f00b17e3b2bc0a552ad7c348.tar.bz2 mpv-23e303859aa93572f00b17e3b2bc0a552ad7c348.tar.xz |
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.
Diffstat (limited to 'demux')
-rw-r--r-- | demux/stheader.h | 1 |
1 files changed, 0 insertions, 1 deletions
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 |