]> git.sesse.net Git - ffmpeg/commitdiff
avformat/ipmovie: Deduplicate parsing video data opcodes
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 18 Mar 2021 20:03:15 +0000 (21:03 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 23 Mar 2021 23:24:50 +0000 (00:24 +0100)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/ipmovie.c

index 3f40bb8fe8abcd8b87732b42689002aa5a149673..f1cc30b6c08d2063d175e4815ae420725394d180 100644 (file)
@@ -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);