summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-09-04 09:00:47 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-09-04 09:00:47 +0000
commit78e035162c471ba78af4bcc348a967197c62fa17 (patch)
tree09e86fa4159eff33f1811f7f507f765905794340 /ffmpeg.c
parentb983a5c60829ff56bbbc44f101a348021d9c2da0 (diff)
the user sets codec->time_base for video encding so she should also set it for audio encoding
Originally committed as revision 4555 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 4c35671da0..a611120000 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1683,6 +1683,7 @@ static int av_encode(AVFormatContext **output_files,
codec->bit_rate = icodec->bit_rate;
codec->extradata= icodec->extradata;
codec->extradata_size= icodec->extradata_size;
+ codec->time_base = icodec->time_base;
switch(codec->codec_type) {
case CODEC_TYPE_AUDIO:
codec->sample_rate = icodec->sample_rate;
@@ -1691,7 +1692,6 @@ static int av_encode(AVFormatContext **output_files,
codec->block_align= icodec->block_align;
break;
case CODEC_TYPE_VIDEO:
- codec->time_base = icodec->time_base;
codec->width = icodec->width;
codec->height = icodec->height;
codec->has_b_frames = icodec->has_b_frames;
@@ -3531,6 +3531,7 @@ static void new_audio_stream(AVFormatContext *oc)
audio_enc->channels = audio_channels;
}
audio_enc->sample_rate = audio_sample_rate;
+ audio_enc->time_base= (AVRational){1, audio_sample_rate};
if (audio_language) {
pstrcpy(st->language, sizeof(st->language), audio_language);
av_free(audio_language);