Commit 510933e0 authored by michael's avatar michael

Fix next_pts computation to consider repeat_pict.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17613 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1611dbd7
...@@ -1261,8 +1261,9 @@ static int output_packet(AVInputStream *ist, int ist_index, ...@@ -1261,8 +1261,9 @@ static int output_packet(AVInputStream *ist, int ist_index,
goto discard_packet; goto discard_packet;
} }
if (ist->st->codec->time_base.num != 0) { if (ist->st->codec->time_base.num != 0) {
int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : 1;
ist->next_pts += ((int64_t)AV_TIME_BASE * ist->next_pts += ((int64_t)AV_TIME_BASE *
ist->st->codec->time_base.num) / ist->st->codec->time_base.num * ticks) /
ist->st->codec->time_base.den; ist->st->codec->time_base.den;
} }
len = 0; len = 0;
...@@ -1289,8 +1290,9 @@ static int output_packet(AVInputStream *ist, int ist_index, ...@@ -1289,8 +1290,9 @@ static int output_packet(AVInputStream *ist, int ist_index,
break; break;
case CODEC_TYPE_VIDEO: case CODEC_TYPE_VIDEO:
if (ist->st->codec->time_base.num != 0) { if (ist->st->codec->time_base.num != 0) {
int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : 1;
ist->next_pts += ((int64_t)AV_TIME_BASE * ist->next_pts += ((int64_t)AV_TIME_BASE *
ist->st->codec->time_base.num) / ist->st->codec->time_base.num * ticks) /
ist->st->codec->time_base.den; ist->st->codec->time_base.den;
} }
break; break;
......
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