Commit 33f3625e authored by michael's avatar michael

simplify (next_)pts code


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12131 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6e598ce0
...@@ -1062,17 +1062,14 @@ static int output_packet(AVInputStream *ist, int ist_index, ...@@ -1062,17 +1062,14 @@ static int output_packet(AVInputStream *ist, int ist_index,
goto handle_eof; goto handle_eof;
} }
if(pkt->dts != AV_NOPTS_VALUE)
ist->next_pts = ist->pts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);
len = pkt->size; len = pkt->size;
ptr = pkt->data; ptr = pkt->data;
while (len > 0) { while (len > 0) {
handle_eof: handle_eof:
if(!pkt || ptr != pkt->data || pkt->dts == AV_NOPTS_VALUE){ ist->pts= ist->next_pts;
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);
} else {
// assert(ist->pts == ist->next_pts);
}
/* decode the packet if needed */ /* decode the packet if needed */
data_buf = NULL; /* fail safe */ data_buf = NULL; /* fail safe */
......
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