diff mbox series

[FFmpeg-devel,1/3] avformat/mov: replace multiple avio_r8() by avio_skip()

Message ID tencent_C113EFD36635C08903CEB3C54C9303284D05@qq.com
State New
Headers show
Series [FFmpeg-devel,1/3] avformat/mov: replace multiple avio_r8() by avio_skip() | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Zhao Zhili Sept. 18, 2020, 2:33 p.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

---
 libavformat/mov.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Liu Steven Sept. 19, 2020, 6:13 a.m. UTC | #1
> 2020年9月18日 下午10:33,Zhao Zhili <quinkblack@foxmail.com> 写道:
> 
> From: Zhao Zhili <zhilizhao@tencent.com>
> 
> ---
> libavformat/mov.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index 9462af743a..8c1243b48d 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -103,9 +103,7 @@ static int mov_metadata_int8_bypass_padding(MOVContext *c, AVIOContext *pb,
>                                             unsigned len, const char *key)
> {
>     /* bypass padding bytes */
> -    avio_r8(pb);
> -    avio_r8(pb);
> -    avio_r8(pb);
> +    avio_skip(pb, 3);
> 
>     c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED;
>     av_dict_set_int(&c->fc->metadata, key, avio_r8(pb), 0);
> -- 
> 2.25.1
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

LGTM


Thanks

Steven Liu
diff mbox series

Patch

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9462af743a..8c1243b48d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -103,9 +103,7 @@  static int mov_metadata_int8_bypass_padding(MOVContext *c, AVIOContext *pb,
                                             unsigned len, const char *key)
 {
     /* bypass padding bytes */
-    avio_r8(pb);
-    avio_r8(pb);
-    avio_r8(pb);
+    avio_skip(pb, 3);
 
     c->fc->event_flags |= AVFMT_EVENT_FLAG_METADATA_UPDATED;
     av_dict_set_int(&c->fc->metadata, key, avio_r8(pb), 0);