aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-09-22 17:50:53 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-09-22 17:50:53 +0000
commit2b18dcd06d0dd7def0f97d72eb424cd3ace37644 (patch)
treefd8029ef0acf5a77fe7aa0bb21742d8107408e84 /ffmpeg.c
parent21e1913175f89e1a0be2ea5eb1167ecc943985d7 (diff)
downloadffmpeg-2b18dcd06d0dd7def0f97d72eb424cd3ace37644.tar.gz
last timestamp and -vsync 0 fix
Originally committed as revision 3492 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 2a817ffde1..4e6ec746c3 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -41,6 +41,9 @@
#include "cmdutils.h"
+#undef NDEBUG
+#include <assert.h>
+
#if !defined(INFINITY) && defined(HUGE_VAL)
#define INFINITY HUGE_VAL
#endif
@@ -1081,7 +1084,9 @@ static int output_packet(AVInputStream *ist, int ist_index,
AVFrame picture;
void *buffer_to_free;
- if (pkt && pkt->dts != AV_NOPTS_VALUE) { //FIXME seems redundant, as libavformat does this too
+ if(!pkt){
+ ist->pts= ist->next_pts; // needed for last packet if vsync=0
+ } else if (pkt->dts != AV_NOPTS_VALUE) { //FIXME seems redundant, as libavformat does this too
ist->next_pts = ist->pts = pkt->dts;
} else {
assert(ist->pts == ist->next_pts);