Commit c1f2dd0d authored by bcoudurier's avatar bcoudurier

set pkt duration, only when dts == pts though

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13003 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4f84cb42
......@@ -1812,6 +1812,10 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
sc->sample_to_ctime_sample = 0;
}
} else {
AVStream *st = s->streams[sc->ffindex];
int64_t next_dts = (sc->current_sample < sc->sample_count) ?
st->index_entries[sc->current_sample].timestamp : st->duration;
pkt->duration = next_dts - pkt->dts;
pkt->pts = pkt->dts;
}
pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? PKT_FLAG_KEY : 0;
......
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