X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fsubfile.c;h=b527f2bee17e1e6d8d4d416b0e6fbfa8037e949c;hb=f50741147ccac999a8a3e8a15244cbe525537622;hp=497cf852116fd8dbdc9781377053752a65623ebb;hpb=529de4f1b6ae92e27fdd5e2420e03908b31e9425;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);