diff mbox series

[FFmpeg-devel,1/5] avformat/movenc: remove unused argument from get_sample_flags()

Message ID tencent_E47115C78906AEAD65415302C85B53E07305@qq.com
State New
Headers show
Series [FFmpeg-devel,1/5] avformat/movenc: remove unused argument from get_sample_flags() | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

zhilizhao(赵志立) Dec. 3, 2021, 5:06 a.m. UTC
---
 libavformat/movenc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

zhilizhao(赵志立) Dec. 13, 2021, 3:03 a.m. UTC | #1
Ping for patch 1-3.

> On Dec 3, 2021, at 1:06 PM, Zhao Zhili <quinkblack@foxmail.com> wrote:
> 
> ---
> libavformat/movenc.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 38ff90833a..634a829f28 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -4427,7 +4427,7 @@ static int mov_write_mfhd_tag(AVIOContext *pb, MOVMuxContext *mov)
>     return 0;
> }
> 
> -static uint32_t get_sample_flags(MOVTrack *track, MOVIentry *entry)
> +static uint32_t get_sample_flags(MOVIentry *entry)
> {
>     return entry->flags & MOV_SYNC_SAMPLE ? MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO :
>            (MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES | MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC);
> @@ -4487,7 +4487,7 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVMuxContext *mov,
>         /* Set the default flags based on the second sample, if available.
>          * If the first sample is different, that can be signaled via a separate field. */
>         if (track->entry > 1)
> -            track->default_sample_flags = get_sample_flags(track, &track->cluster[1]);
> +            track->default_sample_flags = get_sample_flags(&track->cluster[1]);
>         else
>             track->default_sample_flags =
>                 track->par->codec_type == AVMEDIA_TYPE_VIDEO ?
> @@ -4512,11 +4512,11 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
>             flags |= MOV_TRUN_SAMPLE_DURATION;
>         if (track->cluster[i].size != track->default_size)
>             flags |= MOV_TRUN_SAMPLE_SIZE;
> -        if (i > first && get_sample_flags(track, &track->cluster[i]) != track->default_sample_flags)
> +        if (i > first && get_sample_flags(&track->cluster[i]) != track->default_sample_flags)
>             flags |= MOV_TRUN_SAMPLE_FLAGS;
>     }
>     if (!(flags & MOV_TRUN_SAMPLE_FLAGS) && track->entry > 0 &&
> -         get_sample_flags(track, &track->cluster[0]) != track->default_sample_flags)
> +         get_sample_flags(&track->cluster[0]) != track->default_sample_flags)
>         flags |= MOV_TRUN_FIRST_SAMPLE_FLAGS;
>     if (track->flags & MOV_TRACK_CTTS)
>         flags |= MOV_TRUN_SAMPLE_CTS;
> @@ -4538,7 +4538,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
>         avio_wb32(pb, moof_size + 8 + track->data_offset +
>                       track->cluster[first].pos); /* data offset */
>     if (flags & MOV_TRUN_FIRST_SAMPLE_FLAGS)
> -        avio_wb32(pb, get_sample_flags(track, &track->cluster[first]));
> +        avio_wb32(pb, get_sample_flags(&track->cluster[first]));
> 
>     for (i = first; i < end; i++) {
>         if (flags & MOV_TRUN_SAMPLE_DURATION)
> @@ -4546,7 +4546,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
>         if (flags & MOV_TRUN_SAMPLE_SIZE)
>             avio_wb32(pb, track->cluster[i].size);
>         if (flags & MOV_TRUN_SAMPLE_FLAGS)
> -            avio_wb32(pb, get_sample_flags(track, &track->cluster[i]));
> +            avio_wb32(pb, get_sample_flags(&track->cluster[i]));
>         if (flags & MOV_TRUN_SAMPLE_CTS)
>             avio_wb32(pb, track->cluster[i].cts);
>     }
> -- 
> 2.31.1
>
zhilizhao(赵志立) Dec. 28, 2021, 12:43 p.m. UTC | #2
Ping again.

> On Dec 13, 2021, at 11:03 AM, zhilizhao(赵志立) <quinkblack@foxmail.com> wrote:
> 
> Ping for patch 1-3.
> 
>> On Dec 3, 2021, at 1:06 PM, Zhao Zhili <quinkblack@foxmail.com> wrote:
>> 
>> ---
>> libavformat/movenc.c | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>> 
>> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
>> index 38ff90833a..634a829f28 100644
>> --- a/libavformat/movenc.c
>> +++ b/libavformat/movenc.c
>> @@ -4427,7 +4427,7 @@ static int mov_write_mfhd_tag(AVIOContext *pb, MOVMuxContext *mov)
>>    return 0;
>> }
>> 
>> -static uint32_t get_sample_flags(MOVTrack *track, MOVIentry *entry)
>> +static uint32_t get_sample_flags(MOVIentry *entry)
>> {
>>    return entry->flags & MOV_SYNC_SAMPLE ? MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO :
>>           (MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES | MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC);
>> @@ -4487,7 +4487,7 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVMuxContext *mov,
>>        /* Set the default flags based on the second sample, if available.
>>         * If the first sample is different, that can be signaled via a separate field. */
>>        if (track->entry > 1)
>> -            track->default_sample_flags = get_sample_flags(track, &track->cluster[1]);
>> +            track->default_sample_flags = get_sample_flags(&track->cluster[1]);
>>        else
>>            track->default_sample_flags =
>>                track->par->codec_type == AVMEDIA_TYPE_VIDEO ?
>> @@ -4512,11 +4512,11 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
>>            flags |= MOV_TRUN_SAMPLE_DURATION;
>>        if (track->cluster[i].size != track->default_size)
>>            flags |= MOV_TRUN_SAMPLE_SIZE;
>> -        if (i > first && get_sample_flags(track, &track->cluster[i]) != track->default_sample_flags)
>> +        if (i > first && get_sample_flags(&track->cluster[i]) != track->default_sample_flags)
>>            flags |= MOV_TRUN_SAMPLE_FLAGS;
>>    }
>>    if (!(flags & MOV_TRUN_SAMPLE_FLAGS) && track->entry > 0 &&
>> -         get_sample_flags(track, &track->cluster[0]) != track->default_sample_flags)
>> +         get_sample_flags(&track->cluster[0]) != track->default_sample_flags)
>>        flags |= MOV_TRUN_FIRST_SAMPLE_FLAGS;
>>    if (track->flags & MOV_TRACK_CTTS)
>>        flags |= MOV_TRUN_SAMPLE_CTS;
>> @@ -4538,7 +4538,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
>>        avio_wb32(pb, moof_size + 8 + track->data_offset +
>>                      track->cluster[first].pos); /* data offset */
>>    if (flags & MOV_TRUN_FIRST_SAMPLE_FLAGS)
>> -        avio_wb32(pb, get_sample_flags(track, &track->cluster[first]));
>> +        avio_wb32(pb, get_sample_flags(&track->cluster[first]));
>> 
>>    for (i = first; i < end; i++) {
>>        if (flags & MOV_TRUN_SAMPLE_DURATION)
>> @@ -4546,7 +4546,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
>>        if (flags & MOV_TRUN_SAMPLE_SIZE)
>>            avio_wb32(pb, track->cluster[i].size);
>>        if (flags & MOV_TRUN_SAMPLE_FLAGS)
>> -            avio_wb32(pb, get_sample_flags(track, &track->cluster[i]));
>> +            avio_wb32(pb, get_sample_flags(&track->cluster[i]));
>>        if (flags & MOV_TRUN_SAMPLE_CTS)
>>            avio_wb32(pb, track->cluster[i].cts);
>>    }
>> -- 
>> 2.31.1
>> 
>
zhilizhao(赵志立) March 29, 2022, 5:02 a.m. UTC | #3
Ping for patch 1-3.

> On Dec 3, 2021, at 1:06 PM, Zhao Zhili <quinkblack@foxmail.com> wrote:
> 
> ---
> libavformat/movenc.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 38ff90833a..634a829f28 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -4427,7 +4427,7 @@ static int mov_write_mfhd_tag(AVIOContext *pb, MOVMuxContext *mov)
>     return 0;
> }
> 
> -static uint32_t get_sample_flags(MOVTrack *track, MOVIentry *entry)
> +static uint32_t get_sample_flags(MOVIentry *entry)
> {
>     return entry->flags & MOV_SYNC_SAMPLE ? MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO :
>            (MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES | MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC);
> @@ -4487,7 +4487,7 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVMuxContext *mov,
>         /* Set the default flags based on the second sample, if available.
>          * If the first sample is different, that can be signaled via a separate field. */
>         if (track->entry > 1)
> -            track->default_sample_flags = get_sample_flags(track, &track->cluster[1]);
> +            track->default_sample_flags = get_sample_flags(&track->cluster[1]);
>         else
>             track->default_sample_flags =
>                 track->par->codec_type == AVMEDIA_TYPE_VIDEO ?
> @@ -4512,11 +4512,11 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
>             flags |= MOV_TRUN_SAMPLE_DURATION;
>         if (track->cluster[i].size != track->default_size)
>             flags |= MOV_TRUN_SAMPLE_SIZE;
> -        if (i > first && get_sample_flags(track, &track->cluster[i]) != track->default_sample_flags)
> +        if (i > first && get_sample_flags(&track->cluster[i]) != track->default_sample_flags)
>             flags |= MOV_TRUN_SAMPLE_FLAGS;
>     }
>     if (!(flags & MOV_TRUN_SAMPLE_FLAGS) && track->entry > 0 &&
> -         get_sample_flags(track, &track->cluster[0]) != track->default_sample_flags)
> +         get_sample_flags(&track->cluster[0]) != track->default_sample_flags)
>         flags |= MOV_TRUN_FIRST_SAMPLE_FLAGS;
>     if (track->flags & MOV_TRACK_CTTS)
>         flags |= MOV_TRUN_SAMPLE_CTS;
> @@ -4538,7 +4538,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
>         avio_wb32(pb, moof_size + 8 + track->data_offset +
>                       track->cluster[first].pos); /* data offset */
>     if (flags & MOV_TRUN_FIRST_SAMPLE_FLAGS)
> -        avio_wb32(pb, get_sample_flags(track, &track->cluster[first]));
> +        avio_wb32(pb, get_sample_flags(&track->cluster[first]));
> 
>     for (i = first; i < end; i++) {
>         if (flags & MOV_TRUN_SAMPLE_DURATION)
> @@ -4546,7 +4546,7 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
>         if (flags & MOV_TRUN_SAMPLE_SIZE)
>             avio_wb32(pb, track->cluster[i].size);
>         if (flags & MOV_TRUN_SAMPLE_FLAGS)
> -            avio_wb32(pb, get_sample_flags(track, &track->cluster[i]));
> +            avio_wb32(pb, get_sample_flags(&track->cluster[i]));
>         if (flags & MOV_TRUN_SAMPLE_CTS)
>             avio_wb32(pb, track->cluster[i].cts);
>     }
> -- 
> 2.31.1
>
diff mbox series

Patch

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 38ff90833a..634a829f28 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -4427,7 +4427,7 @@  static int mov_write_mfhd_tag(AVIOContext *pb, MOVMuxContext *mov)
     return 0;
 }
 
-static uint32_t get_sample_flags(MOVTrack *track, MOVIentry *entry)
+static uint32_t get_sample_flags(MOVIentry *entry)
 {
     return entry->flags & MOV_SYNC_SAMPLE ? MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO :
            (MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES | MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC);
@@ -4487,7 +4487,7 @@  static int mov_write_tfhd_tag(AVIOContext *pb, MOVMuxContext *mov,
         /* Set the default flags based on the second sample, if available.
          * If the first sample is different, that can be signaled via a separate field. */
         if (track->entry > 1)
-            track->default_sample_flags = get_sample_flags(track, &track->cluster[1]);
+            track->default_sample_flags = get_sample_flags(&track->cluster[1]);
         else
             track->default_sample_flags =
                 track->par->codec_type == AVMEDIA_TYPE_VIDEO ?
@@ -4512,11 +4512,11 @@  static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
             flags |= MOV_TRUN_SAMPLE_DURATION;
         if (track->cluster[i].size != track->default_size)
             flags |= MOV_TRUN_SAMPLE_SIZE;
-        if (i > first && get_sample_flags(track, &track->cluster[i]) != track->default_sample_flags)
+        if (i > first && get_sample_flags(&track->cluster[i]) != track->default_sample_flags)
             flags |= MOV_TRUN_SAMPLE_FLAGS;
     }
     if (!(flags & MOV_TRUN_SAMPLE_FLAGS) && track->entry > 0 &&
-         get_sample_flags(track, &track->cluster[0]) != track->default_sample_flags)
+         get_sample_flags(&track->cluster[0]) != track->default_sample_flags)
         flags |= MOV_TRUN_FIRST_SAMPLE_FLAGS;
     if (track->flags & MOV_TRACK_CTTS)
         flags |= MOV_TRUN_SAMPLE_CTS;
@@ -4538,7 +4538,7 @@  static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
         avio_wb32(pb, moof_size + 8 + track->data_offset +
                       track->cluster[first].pos); /* data offset */
     if (flags & MOV_TRUN_FIRST_SAMPLE_FLAGS)
-        avio_wb32(pb, get_sample_flags(track, &track->cluster[first]));
+        avio_wb32(pb, get_sample_flags(&track->cluster[first]));
 
     for (i = first; i < end; i++) {
         if (flags & MOV_TRUN_SAMPLE_DURATION)
@@ -4546,7 +4546,7 @@  static int mov_write_trun_tag(AVIOContext *pb, MOVMuxContext *mov,
         if (flags & MOV_TRUN_SAMPLE_SIZE)
             avio_wb32(pb, track->cluster[i].size);
         if (flags & MOV_TRUN_SAMPLE_FLAGS)
-            avio_wb32(pb, get_sample_flags(track, &track->cluster[i]));
+            avio_wb32(pb, get_sample_flags(&track->cluster[i]));
         if (flags & MOV_TRUN_SAMPLE_CTS)
             avio_wb32(pb, track->cluster[i].cts);
     }