diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-19 15:20:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-09 13:37:20 +0200 |
commit | 124a433d159bcba054afc01459b7c71ecdff30ad (patch) | |
tree | 2864c1d0437ece34fd55854ab0833a42dfc78d0e | |
parent | 6afbda6ce89c7c3347b2262d2e9c004a30833be4 (diff) | |
download | ffmpeg-124a433d159bcba054afc01459b7c71ecdff30ad.tar.gz |
avformat/wc3movie: Move wc3_read_close() up
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0c635f2ce6c18d448e77605ee83b55bd8250f812)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/wc3movie.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c index cb4d4d933b..a4c6c0d3ba 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(AVProbeData *p) { if (p->buf_size < 12) @@ -284,16 +294,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"), |