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