[FFmpeg-cvslog] doc/protocols: document cache option

2020-12-27 Thread Gyan Doshi
ffmpeg | branch: master | Gyan Doshi  | Sun Dec 27 15:08:24 
2020 +0530| [bff6fbead81498525ef1366bb5bff31a2c737db5] | committer: Gyan Doshi

doc/protocols: document cache option

Add entry for read_ahead_limit

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bff6fbead81498525ef1366bb5bff31a2c737db5
---

 doc/protocols.texi | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/doc/protocols.texi b/doc/protocols.texi
index de377a9546..00a6665482 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -175,6 +175,16 @@ Caching wrapper for input stream.
 
 Cache the input stream to temporary file. It brings seeking capability to live 
streams.
 
+The accepted options are:
+@table @option
+
+@item read_ahead_limit
+Amount in bytes that may be read ahead when seeking isn't supported. Range is 
-1 to INT_MAX.
+-1 for unlimited. Default is 65536.
+
+@end table
+
+URL Syntax is
 @example
 cache:@var{URL}
 @end example

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avfilter/vf_framerate: fix infinite loop with 1-frame input

2020-12-27 Thread Marton Balint
ffmpeg | branch: master | Marton Balint  | Sun Dec 20 19:32:56 
2020 +0100| [6d3b70c27ef1639784fdb3382e5a06b1afa3fe3e] | committer: Marton 
Balint

avfilter/vf_framerate: fix infinite loop with 1-frame input

Fixes infinite loop in:
ffmpeg -f lavfi -i testsrc=d=0.04 -vf framerate=50 -f null none

Signed-off-by: Marton Balint 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6d3b70c27ef1639784fdb3382e5a06b1afa3fe3e
---

 libavfilter/vf_framerate.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c
index 6c8d01c94b..f5085705a4 100644
--- a/libavfilter/vf_framerate.c
+++ b/libavfilter/vf_framerate.c
@@ -170,7 +170,9 @@ static int process_work_frame(AVFilterContext *ctx)
 return 0;
 
 if (!s->f0) {
-s->work = av_frame_clone(s->f1);
+av_assert1(s->flush);
+s->work = s->f1;
+s->f1 = NULL;
 } else {
 if (work_pts >= s->pts1 + s->delta && s->flush)
 return 0;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avfilter/vf_decimate: fix broken logic with ppsrc handling

2020-12-27 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Dec 27 21:01:38 
2020 +0100| [89dcef90af5b444b446ed888486ea9326e9a1141] | committer: Paul B Mahol

avfilter/vf_decimate: fix broken logic with ppsrc handling

Make output bit exact with VIVTC VDecimate filter.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=89dcef90af5b444b446ed888486ea9326e9a1141
---

 libavfilter/vf_decimate.c | 18 ++
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c
index 25bd5bda57..93509d6ab3 100644
--- a/libavfilter/vf_decimate.c
+++ b/libavfilter/vf_decimate.c
@@ -167,11 +167,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 dm->got_frame[INPUT_MAIN] = dm->got_frame[INPUT_CLEANSRC] = 0;
 
 if (dm->ppsrc)
-in = dm->clean_src[dm->fid];
+in = dm->queue[dm->fid].frame;
 
 if (in) {
 /* update frame metrics */
-prv = dm->fid ? (dm->ppsrc ? dm->clean_src[dm->fid - 1] : 
dm->queue[dm->fid - 1].frame) : dm->last;
+prv = dm->fid ? dm->queue[dm->fid - 1].frame : dm->last;
 if (!prv) {
 dm->queue[dm->fid].maxbdiff = INT64_MAX;
 dm->queue[dm->fid].totdiff  = INT64_MAX;
@@ -219,8 +219,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
 av_frame_free(&dm->queue[i].frame);
 } else {
 AVFrame *frame = dm->queue[i].frame;
-if (!frame)
-continue;
 dm->queue[i].frame = NULL;
 if (frame->pts != AV_NOPTS_VALUE && dm->start_pts == 
AV_NOPTS_VALUE)
 dm->start_pts = frame->pts;
@@ -367,8 +365,7 @@ static int config_output(AVFilterLink *outlink)
 {
 AVFilterContext *ctx = outlink->src;
 DecimateContext *dm = ctx->priv;
-const AVFilterLink *inlink =
-ctx->inputs[dm->ppsrc ? INPUT_CLEANSRC : INPUT_MAIN];
+const AVFilterLink *inlink = ctx->inputs[INPUT_MAIN];
 AVRational fps = inlink->frame_rate;
 int max_value;
 const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(inlink->format);
@@ -407,8 +404,13 @@ static int config_output(AVFilterLink *outlink)
 outlink->time_base  = inlink->time_base;
 outlink->frame_rate = fps;
 outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
-outlink->w = inlink->w;
-outlink->h = inlink->h;
+if (dm->ppsrc) {
+outlink->w = ctx->inputs[INPUT_CLEANSRC]->w;
+outlink->h = ctx->inputs[INPUT_CLEANSRC]->h;
+} else {
+outlink->w = inlink->w;
+outlink->h = inlink->h;
+}
 dm->ts_unit = av_inv_q(av_mul_q(fps, outlink->time_base));
 return 0;
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avfilter/vf_decimate: stop dropping last frames with ppsrc

2020-12-27 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Dec 27 21:59:10 
2020 +0100| [4b4282bc57b63de2780333d37487a38f88fb48c7] | committer: Paul B Mahol

avfilter/vf_decimate: stop dropping last frames with ppsrc

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4b4282bc57b63de2780333d37487a38f88fb48c7
---

 libavfilter/vf_decimate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c
index 93509d6ab3..32a4cdc535 100644
--- a/libavfilter/vf_decimate.c
+++ b/libavfilter/vf_decimate.c
@@ -267,7 +267,7 @@ static int activate(AVFilterContext *ctx)
 }
 if (ret < 0) {
 return ret;
-} else if (dm->eof & ((1 << INPUT_MAIN) | (dm->ppsrc << INPUT_CLEANSRC))) {
+} else if (dm->eof == ((1 << INPUT_MAIN) | ((dm->ppsrc << INPUT_CLEANSRC) 
* dm->ppsrc))) {
 ff_outlink_set_status(ctx->outputs[0], AVERROR_EOF, dm->last_pts);
 return 0;
 } else if (!(dm->eof & (1 << INPUT_MAIN)) && 
ff_inlink_acknowledge_status(ctx->inputs[INPUT_MAIN], &status, &pts)) {
@@ -279,6 +279,7 @@ static int activate(AVFilterContext *ctx)
 } else if (dm->ppsrc && !(dm->eof & (1 << INPUT_CLEANSRC)) && 
ff_inlink_acknowledge_status(ctx->inputs[INPUT_CLEANSRC], &status, &pts)) {
 if (status == AVERROR_EOF) { // flushing
 dm->eof |= 1 << INPUT_CLEANSRC;
+filter_frame(ctx->inputs[INPUT_MAIN], NULL);
 return filter_frame(ctx->inputs[INPUT_CLEANSRC], NULL);
 }
 }

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avfilter/vf_decimate: always properly handle EOF

2020-12-27 Thread Paul B Mahol
ffmpeg | branch: master | Paul B Mahol  | Sun Dec 27 22:22:40 
2020 +0100| [f1357274e912b40928ed4dc100b4c1de8750508b] | committer: Paul B Mahol

avfilter/vf_decimate: always properly handle EOF

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f1357274e912b40928ed4dc100b4c1de8750508b
---

 libavfilter/vf_decimate.c | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c
index 32a4cdc535..73d9ba8928 100644
--- a/libavfilter/vf_decimate.c
+++ b/libavfilter/vf_decimate.c
@@ -267,20 +267,25 @@ static int activate(AVFilterContext *ctx)
 }
 if (ret < 0) {
 return ret;
-} else if (dm->eof == ((1 << INPUT_MAIN) | ((dm->ppsrc << INPUT_CLEANSRC) 
* dm->ppsrc))) {
+} else if (dm->eof == ((1 << INPUT_MAIN) | (dm->ppsrc << INPUT_CLEANSRC))) 
{
 ff_outlink_set_status(ctx->outputs[0], AVERROR_EOF, dm->last_pts);
 return 0;
 } else if (!(dm->eof & (1 << INPUT_MAIN)) && 
ff_inlink_acknowledge_status(ctx->inputs[INPUT_MAIN], &status, &pts)) {
 if (status == AVERROR_EOF) { // flushing
 dm->eof |= 1 << INPUT_MAIN;
-if (!dm->ppsrc)
-return filter_frame(ctx->inputs[INPUT_MAIN], NULL);
+if (dm->ppsrc)
+filter_frame(ctx->inputs[INPUT_CLEANSRC], NULL);
+filter_frame(ctx->inputs[INPUT_MAIN], NULL);
+ff_outlink_set_status(ctx->outputs[0], AVERROR_EOF, dm->last_pts);
+return 0;
 }
 } else if (dm->ppsrc && !(dm->eof & (1 << INPUT_CLEANSRC)) && 
ff_inlink_acknowledge_status(ctx->inputs[INPUT_CLEANSRC], &status, &pts)) {
 if (status == AVERROR_EOF) { // flushing
 dm->eof |= 1 << INPUT_CLEANSRC;
 filter_frame(ctx->inputs[INPUT_MAIN], NULL);
-return filter_frame(ctx->inputs[INPUT_CLEANSRC], NULL);
+filter_frame(ctx->inputs[INPUT_CLEANSRC], NULL);
+ff_outlink_set_status(ctx->outputs[0], AVERROR_EOF, dm->last_pts);
+return 0;
 }
 }
 

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] doc/muxers: correct description of hls_enc_key and hls_enc_iv

2020-12-27 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Wed Dec  9 
13:39:22 2020 +0800| [e6e341b2f04eb75a15f4839f3970544e67b19159] | committer: 
liuqi05

doc/muxers: correct description of hls_enc_key and hls_enc_iv

because hls_enc_key and hls_enc_iv get 16byte char
for example:
-hls_enc_key 0123456789abcdef -hls_enc_iv abcdefghijklmnop

Reviewed-by: Gyan Doshi 
Signed-off-by: Steven Liu 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e6e341b2f04eb75a15f4839f3970544e67b19159
---

 doc/muxers.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/muxers.texi b/doc/muxers.texi
index 179b923951..8e12acaa28 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -831,7 +831,7 @@ When enabled every segment generated is encrypted and the 
encryption key
 is saved as @var{playlist name}.key.
 
 @item -hls_enc_key @var{key}
-Hex-coded 16byte key to encrypt the segments, by default it
+16-octet key to encrypt the segments, by default it
 is randomly generated.
 
 @item -hls_enc_key_url @var{keyurl}
@@ -839,7 +839,7 @@ If set, @var{keyurl} is prepended instead of @var{baseurl} 
to the key filename
 in the playlist.
 
 @item -hls_enc_iv @var{iv}
-Hex-coded 16byte initialization vector for every segment instead
+16-octet initialization vector for every segment instead
 of the autogenerated ones.
 
 @item hls_segment_type @var{flags}

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/hls: update comment of file description

2020-12-27 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Wed Dec 23 
17:32:34 2020 +0800| [e7703ae3356f416c6cdd533bb235a5baa01b79b8] | committer: 
liuqi05

avformat/hls: update comment of file description

reference link to rfc8216

Signed-off-by: liuqi05 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e7703ae3356f416c6cdd533bb235a5baa01b79b8
---

 libavformat/hls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 0a522a4595..619e4800de 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -23,7 +23,7 @@
 /**
  * @file
  * Apple HTTP Live Streaming demuxer
- * http://tools.ietf.org/html/draft-pantos-http-live-streaming
+ * https://www.rfc-editor.org/rfc/rfc8216.txt
  */
 
 #include "libavformat/http.h"

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] avformat/hlsproto: update comment of file description

2020-12-27 Thread Steven Liu
ffmpeg | branch: master | Steven Liu  | Wed Dec 23 
17:34:12 2020 +0800| [6080c5e24f2ab29de4d57a40e10ff34aca4d56cf] | committer: 
liuqi05

avformat/hlsproto: update comment of file description

reference link to rfc8216

Signed-off-by: liuqi05 

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6080c5e24f2ab29de4d57a40e10ff34aca4d56cf
---

 libavformat/hlsproto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/hlsproto.c b/libavformat/hlsproto.c
index de45f771d6..9e78f931e8 100644
--- a/libavformat/hlsproto.c
+++ b/libavformat/hlsproto.c
@@ -22,7 +22,7 @@
 /**
  * @file
  * Apple HTTP Live Streaming Protocol Handler
- * http://tools.ietf.org/html/draft-pantos-http-live-streaming
+ * https://www.rfc-editor.org/rfc/rfc8216.txt
  */
 
 #include "libavutil/avstring.h"

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-cvslog] lavu: use address-of operator checking clock_gettime

2020-12-27 Thread Marvin Scholz
ffmpeg | branch: master | Marvin Scholz  | Tue Dec  8 
23:18:25 2020 +0100| [d67c6c7f6f57f0ccdc26fcf1f046ca3fa2e93e59] | committer: 
James Almer

lavu: use address-of operator checking clock_gettime

When targeting a recent enough macOS/iOS version that has clock_gettime
it won't be a weak symbol, in which case clang warns for this check
as it's always true:

  warning: address of function 'clock_gettime' will always
  evaluate to 'true'

This warning is silenced by using the address-of operator to make
the intent explicit.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d67c6c7f6f57f0ccdc26fcf1f046ca3fa2e93e59
---

 libavutil/time.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/time.c b/libavutil/time.c
index afa6658aa6..740afc4785 100644
--- a/libavutil/time.c
+++ b/libavutil/time.c
@@ -57,7 +57,7 @@ int64_t av_gettime_relative(void)
 {
 #if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC)
 #ifdef __APPLE__
-if (clock_gettime)
+if (&clock_gettime)
 #endif
 {
 struct timespec ts;
@@ -72,7 +72,7 @@ int av_gettime_relative_is_monotonic(void)
 {
 #if HAVE_CLOCK_GETTIME && defined(CLOCK_MONOTONIC)
 #ifdef __APPLE__
-if (!clock_gettime)
+if (!&clock_gettime)
 return 0;
 #endif
 return 1;

___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".