Skip to content

Commit

Permalink
oggdec/vorbis: fix stream duration condition
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
Nevcairiel authored and michaelni committed Feb 16, 2014
1 parent bbd8fd0 commit 45581ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavformat/oggparsevorbis.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ static int vorbis_packet(AVFormatContext *s, int idx)
os->lastdts = os->granule - duration;
if (s->streams[idx]->start_time == AV_NOPTS_VALUE) {
s->streams[idx]->start_time = FFMAX(os->lastpts, 0);
if (s->streams[idx]->duration)
if (s->streams[idx]->duration != AV_NOPTS_VALUE)
s->streams[idx]->duration -= s->streams[idx]->start_time;
}
priv->final_pts = AV_NOPTS_VALUE;
Expand Down

0 comments on commit 45581ed

Please sign in to comment.