[FFmpeg-devel] Please provide the FFMPEG public key (GPG/PGP)

2021-02-22 Thread Michael Witten
! Sincerely, Michael Witten ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] libavformat/file.c: 'file_delete()' and 'file_move()' require 'CONFIG_FILE_PROTOCOL'

2021-08-10 Thread Michael Witten
This quashes 2 warnings when the 'file' protocol is not enabled. --- libavformat/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/file.c b/libavformat/file.c index 8303436be0..9c23f680cd 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -167,6 +1

[FFmpeg-devel] [PATCH 0/3] libavformat/protocols.c: avio_enum_protocols(): Cleanup

2021-08-11 Thread Michael Witten
nice history: $ git log --oneline --graph Here is the overall change for the entire series: fftools/cmdutils.c | 4 ++-- libavformat/avio.h | 24 +++- libavformat/protocols.c | 36 +++++++++--- 3 files changed, 50 insertions(+), 14 del

[FFmpeg-devel] [PATCH 1/3] libavformat/protocols.c: avio_enum_protocols(): Add const-correctness

2021-08-11 Thread Michael Witten
This quashes a compile-time warning. * 'url_protocols' is an array of const pointers. * The explicit conversion to '(void *)' is okay, because the destination is an "opaque" blob of private data. --- libavformat/protocols.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) d

[FFmpeg-devel] [PATCH 2.0/3] libavformat/protocols.c: avio_enum_protocols(): Add more const-correctness

2021-08-11 Thread Michael Witten
This commit adds 'const' qualifiers to the parameters. --- libavformat/avio.h | 2 +- libavformat/protocols.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/avio.h b/libavformat/avio.h index 0b35409787..3b92cf742a 100644 --- a/libavformat/avio.h +++ b/liba

[FFmpeg-devel] [PATCH 2.1/3] libavformat/protocols.c: avio_enum_protocols(): Split declaration and initialization

2021-08-11 Thread Michael Witten
The main purpose of doing this is to allow for inserting a a statement label; as I recall, a label cannot be placed just before a declaration, even when that declaration has an initializer (then again, I never tried, so maybe this is not true...) --- libavformat/protocols.c | 3 ++- 1 file change

[FFmpeg-devel] [PATCH 2.2/3] libavformat/protocols.c: avio_enum_protocols(): Convert recursion to iteration

2021-08-11 Thread Michael Witten
In C, it's generally not good to write a recursive algorithm, because it is not possible to rely on the compiler to elide a tail call; therefore, this commit converts a tail call into an iterative loop by means of an explicit 'goto' statement. --- libavformat/protocols.c | 3 ++- 1 file changed, 2

[FFmpeg-devel] [PATCH 2.3/3] libavformat/protocols.c: avio_enum_protocols(): Move 'iterate' label

2021-08-11 Thread Michael Witten
Upon iteration ('goto iterate;'), it is known that 'p' is non-zero, so there is no point in doing the check; it is known that 'p' must be incremented. Therefore, the 'iterate' label may be moved past the ternary operator, provided that '++p;' is added just before the 'goto', so as to perform the re

[FFmpeg-devel] [PATCH 2.4/3] libavformat/protocols.c: avio_enum_protocols(): Consolidate initialization of 'p'

2021-08-11 Thread Michael Witten
Now that the label has been moved past the initial assignment of 'p', it is possible to consolidate both the declaration and initialization. A typedef is used to simplify the declaration of 'p', and to help the reader understand what the purpose of 'p' is. --- libavformat/protocols.c | 6 ++

[FFmpeg-devel] [PATCH 2.5/3] libavformat/protocols.c: avio_enum_protocols(): Add block curly braces to 'if' statement

2021-08-11 Thread Michael Witten
This is preparation for the next commit. --- libavformat/protocols.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/protocols.c b/libavformat/protocols.c index 5e4bf5cbae..bedaa9ef77 100644 --- a/libavformat/protocols.c +++ b/libavformat/protocols.c @@ -101,8 +10

[FFmpeg-devel] [PATCH 2.6/3] libavformat/protocols.c: avio_enum_protocols(): Move assignment to '*opaque'

2021-08-11 Thread Michael Witten
The assignment is not necessary until returning. --- libavformat/protocols.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/protocols.c b/libavformat/protocols.c index bedaa9ef77..ec7c72b14f 100644 --- a/libavformat/protocols.c +++ b/libavformat/protocols.c @@ -96,

[FFmpeg-devel] [PATCH 2.7/3] libavformat/protocols.c: avio_enum_protocols(): Indent code

2021-08-11 Thread Michael Witten
Nothing but white space changed: $ git diff --ignore-all-space "$THIS"^ "$THIS" && echo NOTHING NOTHING This is just setting up for the next commit. --- libavformat/protocols.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/protocols.c b/libavformat/p

[FFmpeg-devel] [PATCH 2.8/3] libavformat/3otocols.c: avio_enum_protocols(): Make the 'else' logic explicit

2021-08-11 Thread Michael Witten
--- libavformat/protocols.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/protocols.c b/libavformat/protocols.c index 3f8433e317..5828113428 100644 --- a/libavformat/protocols.c +++ b/libavformat/protocols.c @@ -99,11 +99,12 @@ iterate: if (!*p) {

[FFmpeg-devel] [PATCH 2.9/3] libavformat/protocols.c: avio_enum_protocols(): Reverse the conditional

2021-08-11 Thread Michael Witten
The 'if(!*p)' has been turned into 'if (*p)'; of course, this has necessitated the swapping of the branches. --- libavformat/protocols.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/protocols.c b/libavformat/protocols.c index 5828113428..0deadbfbe7 10064

[FFmpeg-devel] [PATCH 2.a/3] libavformat/protocols.c: avio_enum_protocols(): Move branch to bottom of function

2021-08-11 Thread Michael Witten
A 'goto done;' statement is used to jump to the desired code. --- libavformat/protocols.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/protocols.c b/libavformat/protocols.c index 0deadbfbe7..032f07bf72 100644 --- a/libavformat/protocols.c +++ b/libavformat

[FFmpeg-devel] [PATCH 2.b/3] libavformat/protocols.c: avio_enum_protocols(): Convert the 'goto' loop to a 'for(; ; )' block

2021-08-11 Thread Michael Witten
The indentation will be cleaned up in the next commit. --- libavformat/protocols.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/protocols.c b/libavformat/protocols.c index 032f07bf72..2aa302d08f 100644 --- a/libavformat/protocols.c +++ b/libavformat/protocol

[FFmpeg-devel] [PATCH 2.c/3] libavformat/protocols.c: avio_enum_protocols(): Move the loop variables

2021-08-11 Thread Michael Witten
The loop variables can now be moved into their respective slots of the 'for(;;)' statement; this removes the need for the 'done' label. --- libavformat/protocols.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libavformat/protocols.c b/libavformat/protocols.c index 2a

[FFmpeg-devel] [PATCH 2.d/3] libavformat/protocols.c: avio_enum_protocols(): Move loop initialization

2021-08-11 Thread Michael Witten
For the sake of completeness and scope correctness, the declaration and initialization of 'p' has been moved into the 'for(;;)' statement. --- libavformat/protocols.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/protocols.c b/libavformat/protocols.c index e3cd

[FFmpeg-devel] [PATCH 3/3] libavformat/protocols.c: avio_enum_protocols_{input, output}(): Add functions to the API

2021-08-11 Thread Michael Witten
In the repo, there is only one function that enumerates protocols: fftools/cmdutils.c: show_protocols() This commit simply has that function make calls directly to the desired functions, namely: * avio_enum_protocols_for_input() * avio_enum_protocols_for_output() --- fftools/cmdutils.c

[FFmpeg-devel] [PATCH 2.e/3] libavformat/protocols.c: avio_enum_protocols(): Create a macro for generating different loops

2021-08-11 Thread Michael Witten
The function 'avio_enum_protocols()' iterates through the list of protocols, looking for a protocol that has a certain non-zero pointer-to-function; the exact pointer-to-function to use depends on the the argument passed through the parameter 'output'. * Before this commit, the parameter 'output'

Re: [FFmpeg-devel] [PATCH 2.b/3] libavformat/protocols.c: avio_enum_protocols(): Convert the 'goto' loop to a 'for(; ; )' block

2021-08-11 Thread Michael Witten
| Michael Witten: | | > -iterate: | > +for(;;) { | > if (*p) { | > if ((output && (*p)->url_write) || (!output && (*p)->url_read)) { | > *opaque = (void *)p; | > @@ -105,7 +105,7 @@ iterate: | >

Re: [FFmpeg-devel] [PATCH 0/3] libavformat/protocols.c: avio_enum_protocols(): Cleanup

2021-08-11 Thread Michael Witten
| Michael Witten: | | > However, {2} is presented as a bunch of tiny little transformations | > that are intended to aid comprehension; they can be squashed into | > one commit as the maintainer sees fit (indeed, as shown below, the | > squashed diff is already quite co

Re: [FFmpeg-devel] [PATCH 2.0/3] libavformat/protocols.c: avio_enum_protocols(): Add more const-correctness

2021-08-11 Thread Michael Witten
| Michael Witten: | | > -const char *avio_enum_protocols(void **opaque, int output) | > +const char *avio_enum_protocols(void **const opaque, const int output) | | Andreas Rheinhardt: | | > This thing makes nothing more const-correct at all; C uses call be | > value, so we on

Re: [FFmpeg-devel] [PATCH 3/3] libavformat/protocols.c: avio_enum_protocols_{input, output}(): Add functions to the API

2021-08-11 Thread Michael Witten
| Michael Witten: | | > In the repo, there is only one function that enumerates protocols: | > | > fftools/cmdutils.c: show_protocols() | > | > This commit simply has that function make calls directly to the | > desired functions, namely: | > | > * avio_

[FFmpeg-devel] [PATCH v1 0/2] libavformat/protocols.c: avio_enum_protocols(): Cleanup

2021-08-20 Thread Michael Witten
changed, 28 insertions(+), 12 deletions(-) Sincerely, Michael Witten ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH v1 1/2] libavformat/protocols.c: avio_enum_protocols(): Quash warning about const-correctness

2021-08-20 Thread Michael Witten
Date: Wed, 11 Aug 2021 10:15:01 - This quashes a compile-time warning. * 'url_protocols' is an array of const pointers. * The explicit conversion to '(void *)' is okay, because the destination is an "opaque" blob of private data. --- libavformat/protocols.c | 4 ++-- 1 file chang

[FFmpeg-devel] [PATCH v1 2/2] libavformat/protocols.c: avio_enum_protocols(): Refactor

2021-08-20 Thread Michael Witten
Date: Wed, 11 Aug 2021 19:00:00 - This commit is the result of squashing a series of very tiny transformations; it refactors 'avio_enum_protocols()' into 2 functions: * avio_enum_protocols_for_input() * avio_enum_protocols_for_output() Those functions are in turn mostly implemented by thi

Re: [FFmpeg-devel] [PATCH v1 0/2] libavformat/protocols.c: avio_enum_protocols(): Cleanup

2021-08-27 Thread Michael Witten
Michael Witten (1 week ago): > This series improves the following function: > > libavformat/protocols.c: avio_enum_protocols() > > There are only 2 commits: > > [1] Quash warning about const-correctness > [2] Refactoring > > This series is a