aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-02-23 22:06:36 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-02-23 22:06:36 +0000
commitb8c93c483b4d507086a2efd1c1ba425c4fce4df3 (patch)
tree128a84a297a65557a1e2866281725d73fdf47c51 /ffmpeg.c
parentfc298fd9be34545e0afa0024040e16855fe26fd9 (diff)
downloadffmpeg-b8c93c483b4d507086a2efd1c1ba425c4fce4df3.tar.gz
Set ist->pts to something that isnt guranteed to entangle itself with stream copying b frames.
Originally committed as revision 22010 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index ecaa7e114d..9bc509d9f0 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2090,8 +2090,10 @@ static int av_encode(AVFormatContext **output_files,
/* init pts */
for(i=0;i<nb_istreams;i++) {
+ AVStream *st;
ist = ist_table[i];
- ist->pts = 0;
+ st= ist->st;
+ ist->pts = st->avg_frame_rate.num ? - st->codec->has_b_frames*AV_TIME_BASE / av_q2d(st->avg_frame_rate) : 0;
ist->next_pts = AV_NOPTS_VALUE;
ist->is_start = 1;
}