]> git.sesse.net Git - ffmpeg/commitdiff
avformat/wc3movie: Move wc3_read_close() up
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 19 Jul 2020 13:20:14 +0000 (15:20 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 20 Sep 2020 16:03:52 +0000 (18:03 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/wc3movie.c

index 65770077773884f281f29d3ef23557db302e8350..c59b5bf6cc651d9a9c4c3c7e2474f2d24c01c84e 100644 (file)
@@ -73,6 +73,16 @@ typedef struct Wc3DemuxContext {
 
 } Wc3DemuxContext;
 
+static int wc3_read_close(AVFormatContext *s)
+{
+    Wc3DemuxContext *wc3 = s->priv_data;
+
+    if (wc3->vpkt.size > 0)
+        av_packet_unref(&wc3->vpkt);
+
+    return 0;
+}
+
 static int wc3_probe(const AVProbeData *p)
 {
     if (p->buf_size < 12)
@@ -286,16 +296,6 @@ static int wc3_read_packet(AVFormatContext *s,
     return ret;
 }
 
-static int wc3_read_close(AVFormatContext *s)
-{
-    Wc3DemuxContext *wc3 = s->priv_data;
-
-    if (wc3->vpkt.size > 0)
-        av_packet_unref(&wc3->vpkt);
-
-    return 0;
-}
-
 AVInputFormat ff_wc3_demuxer = {
     .name           = "wc3movie",
     .long_name      = NULL_IF_CONFIG_SMALL("Wing Commander III movie"),