Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGyan Doshi <gyandoshi@gmail.com>2017-11-15 15:06:19 +0300
committerNicolas George <george@nsup.org>2017-11-19 21:11:50 +0300
commite75fe0ef213074381c09e074f1f9619012f1ffad (patch)
tree0aa5ee1ee379af89ad348dfdeab49bd6e708d63b /libavformat/subfile.c
parent4f4e19914ddca5096bf7639c7c99a9045e436e8b (diff)
avformat/subfile: allow to extract till EOF
Users can set end offset as 0 to extract till end of file. Tested locally and documented.
Diffstat (limited to 'libavformat/subfile.c')
-rw-r--r--libavformat/subfile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/subfile.c b/libavformat/subfile.c
index 497cf85211..b527f2bee1 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);