[PATCH 3/3] Fix timestamp of the filtered frames.

Stefano Sabatini stefano.sabatini-lala
Sat Oct 30 01:43:42 CEST 2010


The ffmpeg.c code expect that ist->pts is scaled against
ist->st->time_base.
---
 ffmpeg.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 83f4bb7..47c825c 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1614,7 +1614,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
             if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ist->output_video_filter)
                 get_filtered_video_frame(ist->output_video_filter, &picture, &ist->picref, &ist_pts_tb);
             if (ist->picref)
-                ist->pts = ist->picref->pts;
+                ist->pts = av_rescale_q(ist->picref->pts, ist_pts_tb, ist->st->time_base);
 #endif
             for(i=0;i<nb_ostreams;i++) {
                 int frame_size;
-- 
1.7.1


--DocE+STaALJfprDB--



More information about the ffmpeg-devel mailing list