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
This commit is contained in:
committed by
Michael Niedermayer
parent
224944895e
commit
4b85a28f27
6
ffmpeg.c
6
ffmpeg.c
@@ -986,7 +986,7 @@ static void print_report(AVFormatContext **output_files,
|
|||||||
/* pkt = NULL means EOF (needed to flush decoder buffers) */
|
/* pkt = NULL means EOF (needed to flush decoder buffers) */
|
||||||
static int output_packet(AVInputStream *ist, int ist_index,
|
static int output_packet(AVInputStream *ist, int ist_index,
|
||||||
AVOutputStream **ost_table, int nb_ostreams,
|
AVOutputStream **ost_table, int nb_ostreams,
|
||||||
AVPacket *pkt)
|
const AVPacket *pkt)
|
||||||
{
|
{
|
||||||
AVFormatContext *os;
|
AVFormatContext *os;
|
||||||
AVOutputStream *ost;
|
AVOutputStream *ost;
|
||||||
@@ -1036,8 +1036,8 @@ static int output_packet(AVInputStream *ist, int ist_index,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
data_buf = (uint8_t *)samples;
|
data_buf = (uint8_t *)samples;
|
||||||
ist->next_pts += ((int64_t)AV_TIME_BASE * data_size) /
|
ist->next_pts += ((int64_t)AV_TIME_BASE/2 * data_size) /
|
||||||
(2 * ist->st->codec.channels);
|
(ist->st->codec.sample_rate * ist->st->codec.channels);
|
||||||
break;
|
break;
|
||||||
case CODEC_TYPE_VIDEO:
|
case CODEC_TYPE_VIDEO:
|
||||||
data_size = (ist->st->codec.width * ist->st->codec.height * 3) / 2;
|
data_size = (ist->st->codec.width * ist->st->codec.height * 3) / 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user