summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-02-17 17:41:32 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-02-17 17:41:32 +0000
commitda0ef2d5574f3729db7be1e49c2cb53a94fb35b9 (patch)
tree9df67ea82c4be1a851ff1f2ab9cc3e59927c58ea /ffmpeg.c
parent1d03e71805eb18813250a1337dd3dab15c004aa0 (diff)
Use next_pts if pkt->dts is unknown. In an ideal world this would not be needed
but sadly there are cases where the timestamps cannot be found without decoding. Originally committed as revision 12130 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 6d0924d43c..170478ff76 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1066,7 +1066,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
ptr = pkt->data;
while (len > 0) {
handle_eof:
- if(!pkt || ptr != pkt->data){
+ if(!pkt || ptr != pkt->data || pkt->dts == AV_NOPTS_VALUE){
ist->pts= ist->next_pts; // needed for last packet if vsync=0 and for multi pkt
} else if (pkt->dts != AV_NOPTS_VALUE) { //FIXME seems redundant, as libavformat does this too
ist->next_pts = ist->pts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);