X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fsubfile.c;h=b527f2bee17e1e6d8d4d416b0e6fbfa8037e949c;hb=c86490c49a3d0683b2f63338430a369c174e2bd5;hp=497cf852116fd8dbdc9781377053752a65623ebb;hpb=8882e8ad0d5c8b53cc1fce158cfdbe8284efd5bb;p=ffmpeg diff --git a/libavformat/subfile.c b/libavformat/subfile.c index 497cf852116..b527f2bee17 100644 --- a/libavformat/subfile.c +++ b/libavformat/subfile.c @@ -72,6 +72,9 @@ static int subfile_open(URLContext *h, const char *filename, int flags, SubfileContext *c = h->priv_data; int ret; + if (!c->end) + c->end = INT64_MAX; + if (c->end <= c->start) { av_log(h, AV_LOG_ERROR, "end before start\n"); return AVERROR(EINVAL);