diff mbox

[FFmpeg-devel,1/6] lavf/allformats: remove left-over index decrement

Message ID 20180401023945.42053-1-josh@itanimul.li
State Accepted
Commit db85d657faabf8e5ce7690ddbe6325ec430c61e7
Headers show

Commit Message

Josh Dekker April 1, 2018, 2:39 a.m. UTC
Signed-off-by: Josh de Kock <josh@itanimul.li>
---
 libavformat/allformats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Josh Dekker April 2, 2018, 1:22 a.m. UTC | #1
On 2018/04/01 3:39, Josh de Kock wrote:
> Signed-off-by: Josh de Kock <josh@itanimul.li>
> ---
>   libavformat/allformats.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/allformats.c b/libavformat/allformats.c
> index 2a20548c95..cf430a9680 100644
> --- a/libavformat/allformats.c
> +++ b/libavformat/allformats.c
> @@ -493,7 +493,7 @@ const AVOutputFormat *av_muxer_iterate(void **opaque)
>       uintptr_t i = (uintptr_t)*opaque;
>       const AVOutputFormat *f = NULL;
>   
> -    if (i < size - 1) {
> +    if (i < size) {
>           f = muxer_list[i];
>       } else if (indev_list) {
>           f = outdev_list[i - size];
> 

This is a tiny fix, I don't consider this to need review.

Pushed.
wm4 April 2, 2018, 1:40 a.m. UTC | #2
On Sun,  1 Apr 2018 03:39:40 +0100
Josh de Kock <josh@itanimul.li> wrote:

> Signed-off-by: Josh de Kock <josh@itanimul.li>
> ---
>  libavformat/allformats.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/allformats.c b/libavformat/allformats.c
> index 2a20548c95..cf430a9680 100644
> --- a/libavformat/allformats.c
> +++ b/libavformat/allformats.c
> @@ -493,7 +493,7 @@ const AVOutputFormat *av_muxer_iterate(void **opaque)
>      uintptr_t i = (uintptr_t)*opaque;
>      const AVOutputFormat *f = NULL;
>  
> -    if (i < size - 1) {
> +    if (i < size) {
>          f = muxer_list[i];
>      } else if (indev_list) {
>          f = outdev_list[i - size];

Patches 2, 4, 5, 6 should be OK too (if they were tested and work).
Only had a cosmetic comment about patch 2.
Josh Dekker April 2, 2018, 2:39 a.m. UTC | #3
On 2018/04/02 2:40, wm4 wrote:
> On Sun,  1 Apr 2018 03:39:40 +0100
> Josh de Kock <josh@itanimul.li> wrote:
> 
>> Signed-off-by: Josh de Kock <josh@itanimul.li>
>> ---
>>   libavformat/allformats.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavformat/allformats.c b/libavformat/allformats.c
>> index 2a20548c95..cf430a9680 100644
>> --- a/libavformat/allformats.c
>> +++ b/libavformat/allformats.c
>> @@ -493,7 +493,7 @@ const AVOutputFormat *av_muxer_iterate(void **opaque)
>>       uintptr_t i = (uintptr_t)*opaque;
>>       const AVOutputFormat *f = NULL;
>>   
>> -    if (i < size - 1) {
>> +    if (i < size) {
>>           f = muxer_list[i];
>>       } else if (indev_list) {
>>           f = outdev_list[i - size];
> 
> Patches 2, 4, 5, 6 should be OK too (if they were tested and work).
> Only had a cosmetic comment about patch 2.

Pushed with the cosmetic change in patch 2.
diff mbox

Patch

diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 2a20548c95..cf430a9680 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -493,7 +493,7 @@  const AVOutputFormat *av_muxer_iterate(void **opaque)
     uintptr_t i = (uintptr_t)*opaque;
     const AVOutputFormat *f = NULL;
 
-    if (i < size - 1) {
+    if (i < size) {
         f = muxer_list[i];
     } else if (indev_list) {
         f = outdev_list[i - size];