summaryrefslogtreecommitdiff
path: root/libavformat/smoothstreamingenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/smoothstreamingenc.c')
-rw-r--r--libavformat/smoothstreamingenc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
index 65ef942367..36330b17b6 100644
--- a/libavformat/smoothstreamingenc.c
+++ b/libavformat/smoothstreamingenc.c
@@ -582,15 +582,16 @@ static int ism_write_packet(AVFormatContext *s, AVPacket *pkt)
{
SmoothStreamingContext *c = s->priv_data;
AVStream *st = s->streams[pkt->stream_index];
+ FFStream *const sti = ffstream(st);
OutputStream *os = &c->streams[pkt->stream_index];
int64_t end_dts = (c->nb_fragments + 1) * (int64_t) c->min_frag_duration;
int ret;
- if (st->internal->first_dts == AV_NOPTS_VALUE)
- st->internal->first_dts = pkt->dts;
+ if (sti->first_dts == AV_NOPTS_VALUE)
+ sti->first_dts = pkt->dts;
if ((!c->has_video || st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) &&
- av_compare_ts(pkt->dts - st->internal->first_dts, st->time_base,
+ av_compare_ts(pkt->dts - sti->first_dts, st->time_base,
end_dts, AV_TIME_BASE_Q) >= 0 &&
pkt->flags & AV_PKT_FLAG_KEY && os->packets_written) {