diff mbox series

[FFmpeg-devel,1/6] avformat/wc3movie: Move wc3_read_close() up

Message ID 20200719174218.30659-1-michael@niedermayer.cc
State Accepted
Commit 0c635f2ce6c18d448e77605ee83b55bd8250f812
Headers show
Series [FFmpeg-devel,1/6] avformat/wc3movie: Move wc3_read_close() up
Related show

Checks

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

Commit Message

Michael Niedermayer July 19, 2020, 5:42 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/wc3movie.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index 6577007777..c59b5bf6cc 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -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"),