Set next_pts to pts if it is unknown and pkt->dts is not known either. This

is needed because next_pts is used to calculate the next pts and adding
to AV_NOPTS_VALUE does not achieve the intended result.

Originally committed as revision 12132 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-02-17 19:08:15 +00:00
parent b1b818fce8
commit ed9238593e

View File

@ -1055,6 +1055,9 @@ static int output_packet(AVInputStream *ist, int ist_index,
AVSubtitle subtitle, *subtitle_to_free;
int got_subtitle;
if(ist->next_pts == AV_NOPTS_VALUE)
ist->next_pts= ist->pts;
if (pkt == NULL) {
/* EOF handling */
ptr = NULL;