Message ID | 54CFAA4E-478B-41A4-96EC-C937B4C1CF97@focusware.nl |
---|---|
State | New |
Headers | show |
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 902896ef81..85167761b9 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2201,7 +2201,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) end_pts = init_list_dur + after_init_list_dur ; } - if (vs->start_pts == AV_NOPTS_VALUE) { + if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && vs->start_pts == AV_NOPTS_VALUE) { vs->start_pts = pkt->pts; vs->end_frame = st->nb_frames; }