aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-12-30 14:21:14 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-12-30 14:21:14 +0000
commitf6bf6e511d297f0b74085fc464d2743e704f6208 (patch)
treea3a72af88b3db6a5242f63bda2859d393f38aa07 /libavformat
parentb3f5c21a9122fd587f251a17bc6d011112dd5267 (diff)
downloadffmpeg-f6bf6e511d297f0b74085fc464d2743e704f6208.tar.gz
Set blkalign to maximum framesize to allow playback on WMP (see issue 2455 and issue 2446).
Originally committed as revision 26167 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/riff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 3d584a3779..7db1c87513 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -373,6 +373,10 @@ int ff_put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_AC3) {
blkalign = enc->frame_size; //this is wrong, but it seems many demuxers do not work if this is set correctly
//blkalign = 144 * enc->bit_rate/enc->sample_rate;
+ //For high bitrate AC-3, set blkalign to maximum bytes per frame value
+ //to allow playback on WMP and MPlayer
+ if (enc->bit_rate > 384000)
+ blkalign = 3840;
} else if (enc->codec_id == CODEC_ID_ADPCM_G726) { //
blkalign = 1;
} else if (enc->block_align != 0) { /* specified by the codec */