diff --git a/libavformat/hls.c b/libavformat/hls.c index 41ba434e9e..54e971a765 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -616,7 +616,7 @@ start: AVStream *st; ret = av_read_frame(var->ctx, &var->pkt); if (ret < 0) { - if (!url_feof(&var->pb)) + if (!url_feof(&var->pb) && ret != AVERROR_EOF) return ret; reset_packet(&var->pkt); break;