aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-11-01 17:56:22 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-11-01 17:56:22 +0000
commitf45b744cb7b2a32188fccac902da597454a04ed9 (patch)
tree3552583160ccce2d48075543c5343902230ccd87
parentaa90239fd972dbfc853ce127844531a9f423fc38 (diff)
downloadffmpeg-f45b744cb7b2a32188fccac902da597454a04ed9.tar.gz
simplify
Originally committed as revision 6855 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/movenc.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 2956326368..013005b0f0 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -345,13 +345,10 @@ static const CodecTag codec_movaudio_tags[] = {
static int mov_write_audio_tag(ByteIOContext *pb, MOVTrack* track)
{
offset_t pos = url_ftell(pb);
- int vbr= track->mode == MODE_MOV &&
- (track->enc->codec_id == CODEC_ID_AAC ||
- track->enc->codec_id == CODEC_ID_MP3 ||
- track->enc->codec_id == CODEC_ID_AMR_NB);
- int version = vbr ||
- track->enc->codec_id == CODEC_ID_PCM_S32LE ||
- track->enc->codec_id == CODEC_ID_PCM_S24LE;
+ int version = track->mode == MODE_MOV &&
+ (track->audio_vbr ||
+ track->enc->codec_id == CODEC_ID_PCM_S32LE ||
+ track->enc->codec_id == CODEC_ID_PCM_S24LE);
put_be32(pb, 0); /* size */
put_le32(pb, track->tag); // store it byteswapped
@@ -368,14 +365,12 @@ static int mov_write_audio_tag(ByteIOContext *pb, MOVTrack* track)
/* FIXME 8 bit for 'raw ' in mov */
put_be16(pb, 16); /* Reserved */
- put_be16(pb, vbr ? 0xfffe : 0); /* compression ID */
+ put_be16(pb, track->mode == MODE_MOV && track->audio_vbr ? -2 : 0); /* compression ID */
put_be16(pb, 0); /* packet size (= 0) */
put_be16(pb, track->timescale); /* Time scale */
put_be16(pb, 0); /* Reserved */
if(version == 1) { /* SoundDescription V1 extended info */
- if (vbr)
- track->sampleSize = 0;
put_be32(pb, track->enc->frame_size); /* Samples per packet */
put_be32(pb, track->sampleSize / track->enc->channels); /* Bytes per packet */
put_be32(pb, track->sampleSize); /* Bytes per frame */