diff mbox series

[FFmpeg-devel,10/18] avformat/ipmovie: Deduplicate parsing video data opcodes

Message ID 20210319055904.2264501-10-andreas.rheinhardt@gmail.com
State Accepted
Commit 7070bc53aa10d050a52a282a59d262c236f9281b
Headers show
Series [FFmpeg-devel,01/18] libavformat/utils: Fix indentation | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt March 19, 2021, 5:58 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/ipmovie.c | 23 +++--------------------
 1 file changed, 3 insertions(+), 20 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index 3f40bb8fe8..f1cc30b6c0 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -560,28 +560,11 @@  static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
             break;
 
         case OPCODE_VIDEO_DATA_06:
-            av_log(s->avf, AV_LOG_TRACE, "set video data format 0x06\n");
-            s->frame_format = 0x06;
-
-            /* log position and move on for now */
-            s->video_chunk_offset = avio_tell(pb);
-            s->video_chunk_size = opcode_size;
-            avio_skip(pb, opcode_size);
-            break;
-
         case OPCODE_VIDEO_DATA_10:
-            av_log(s->avf, AV_LOG_TRACE, "set video data format 0x10\n");
-            s->frame_format = 0x10;
-
-            /* log position and move on for now */
-            s->video_chunk_offset = avio_tell(pb);
-            s->video_chunk_size = opcode_size;
-            avio_skip(pb, opcode_size);
-            break;
-
         case OPCODE_VIDEO_DATA_11:
-            av_log(s->avf, AV_LOG_TRACE, "set video data format 0x11\n");
-            s->frame_format = 0x11;
+            s->frame_format = opcode_type;
+            av_log(s->avf, AV_LOG_TRACE, "set video data format 0x%02X\n",
+                   opcode_type);
 
             /* log position and move on for now */
             s->video_chunk_offset = avio_tell(pb);