Mercurial > libavformat.hg
changeset 529:0b867ba59753 libavformat
write shorter headers if possible
author | michael |
---|---|
date | Wed, 22 Sep 2004 20:01:56 +0000 |
parents | 0f9b7efc444b |
children | c7219ac0b694 |
files | wav.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/wav.c Wed Sep 22 04:51:01 2004 +0000 +++ b/wav.c Wed Sep 22 20:01:56 2004 +0000 @@ -107,7 +107,7 @@ put_le16(pb, 2); /* wav_extra_size */ hdrsize += 2; put_le16(pb, ((enc->block_align - 4 * enc->channels) / (4 * enc->channels)) * 8 + 1); /* wSamplesPerBlock */ - } else { + } else if(enc->extradata_size){ put_le16(pb, enc->extradata_size); put_buffer(pb, enc->extradata, enc->extradata_size); hdrsize += enc->extradata_size; @@ -115,6 +115,8 @@ hdrsize++; put_byte(pb, 0); } + } else { + hdrsize -= 2; } return hdrsize;