aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Gloger <wmglo@dent.med.uni-muenchen.de>2004-04-26 23:06:29 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-04-26 23:06:29 +0000
commit4b85a28f2766dd2896d311675e26ae0350b296ed (patch)
treec4ecb9482289e003f1749244217ca061a8abb2f1
parent224944895efe6ac23e3b8f9d35abfee9f5c6c440 (diff)
downloadffmpeg-4b85a28f2766dd2896d311675e26ae0350b296ed.tar.gz
Fix synthetic next_pts calculation / audio pts patch by (Wolfram Gloger <wmglo at dent dot med dot uni-muenchen dot de>)
Originally committed as revision 3079 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffmpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 83582e4144..f74ae775fe 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -986,7 +986,7 @@ static void print_report(AVFormatContext **output_files,
/* pkt = NULL means EOF (needed to flush decoder buffers) */
static int output_packet(AVInputStream *ist, int ist_index,
AVOutputStream **ost_table, int nb_ostreams,
- AVPacket *pkt)
+ const AVPacket *pkt)
{
AVFormatContext *os;
AVOutputStream *ost;
@@ -1036,8 +1036,8 @@ static int output_packet(AVInputStream *ist, int ist_index,
continue;
}
data_buf = (uint8_t *)samples;
- ist->next_pts += ((int64_t)AV_TIME_BASE * data_size) /
- (2 * ist->st->codec.channels);
+ ist->next_pts += ((int64_t)AV_TIME_BASE/2 * data_size) /
+ (ist->st->codec.sample_rate * ist->st->codec.channels);
break;
case CODEC_TYPE_VIDEO:
data_size = (ist->st->codec.width * ist->st->codec.height * 3) / 2;