Commit 2b18dcd0 authored by Michael Niedermayer's avatar Michael Niedermayer

last timestamp and -vsync 0 fix

Originally committed as revision 3492 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 21e19131
...@@ -41,6 +41,9 @@ ...@@ -41,6 +41,9 @@
#include "cmdutils.h" #include "cmdutils.h"
#undef NDEBUG
#include <assert.h>
#if !defined(INFINITY) && defined(HUGE_VAL) #if !defined(INFINITY) && defined(HUGE_VAL)
#define INFINITY HUGE_VAL #define INFINITY HUGE_VAL
#endif #endif
...@@ -1081,7 +1084,9 @@ static int output_packet(AVInputStream *ist, int ist_index, ...@@ -1081,7 +1084,9 @@ static int output_packet(AVInputStream *ist, int ist_index,
AVFrame picture; AVFrame picture;
void *buffer_to_free; 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; ist->next_pts = ist->pts = pkt->dts;
} else { } else {
assert(ist->pts == ist->next_pts); assert(ist->pts == ist->next_pts);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment