summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2010-09-18 20:16:56 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2010-09-18 20:16:56 +0000
commit37f5a713de1ae1d6eadf8f62b140a3b5dbfdcb1f (patch)
tree3ae517ee8ae5b087230746c919a40795a5644651 /ffmpeg.c
parent61410787b87cf5f3216f3e699016f26534142498 (diff)
Change remaining ost->st->codec and ist->st->codec to enc and dec in
do_audio_out(). Originally committed as revision 25143 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index da92581af0..e43e6fbe5e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -867,9 +867,9 @@ need_realloc:
if(audio_sync_method){
double delta = get_sync_ipts(ost) * enc->sample_rate - ost->sync_opts
- - av_fifo_size(ost->fifo)/(ost->st->codec->channels * 2);
- double idelta= delta*ist->st->codec->sample_rate / enc->sample_rate;
- int byte_delta= ((int)idelta)*2*ist->st->codec->channels;
+ - av_fifo_size(ost->fifo)/(enc->channels * 2);
+ double idelta= delta*dec->sample_rate / enc->sample_rate;
+ int byte_delta= ((int)idelta)*2*enc->channels;
//FIXME resample delay
if(fabs(delta) > 50){
@@ -911,13 +911,13 @@ need_realloc:
}
}else
ost->sync_opts= lrintf(get_sync_ipts(ost) * enc->sample_rate)
- - av_fifo_size(ost->fifo)/(ost->st->codec->channels * 2); //FIXME wrong
+ - av_fifo_size(ost->fifo)/(enc->channels * 2); //FIXME wrong
if (ost->audio_resample) {
buftmp = audio_buf;
size_out = audio_resample(ost->resample,
(short *)buftmp, (short *)buf,
- size / (ist->st->codec->channels * isize));
+ size / (dec->channels * isize));
size_out = size_out * enc->channels * osize;
} else {
buftmp = buf;
@@ -972,7 +972,7 @@ need_realloc:
if(enc->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE)
pkt.pts= av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base);
pkt.flags |= AV_PKT_FLAG_KEY;
- write_frame(s, &pkt, ost->st->codec, bitstream_filters[ost->file_index][pkt.stream_index]);
+ write_frame(s, &pkt, enc, bitstream_filters[ost->file_index][pkt.stream_index]);
ost->sync_opts += enc->frame_size;
}
@@ -1007,7 +1007,7 @@ need_realloc:
if(enc->coded_frame && enc->coded_frame->pts != AV_NOPTS_VALUE)
pkt.pts= av_rescale_q(enc->coded_frame->pts, enc->time_base, ost->st->time_base);
pkt.flags |= AV_PKT_FLAG_KEY;
- write_frame(s, &pkt, ost->st->codec, bitstream_filters[ost->file_index][pkt.stream_index]);
+ write_frame(s, &pkt, enc, bitstream_filters[ost->file_index][pkt.stream_index]);
}
}