[vlc-commits] xwd: reorder to avoid forward declarations
Rémi Denis-Courmont
git at videolan.org
Sat Nov 23 20:04:19 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 23 18:53:09 2019 +0200| [894a58fac22515add856acfa8e91a67a16085015] | committer: Rémi Denis-Courmont
xwd: reorder to avoid forward declarations
No functional changes.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=894a58fac22515add856acfa8e91a67a16085015
---
modules/codec/xwd.c | 46 +++++++++++++++++++++-------------------------
1 file changed, 21 insertions(+), 25 deletions(-)
diff --git a/modules/codec/xwd.c b/modules/codec/xwd.c
index eb3bb55564..f75c1d513b 100644
--- a/modules/codec/xwd.c
+++ b/modules/codec/xwd.c
@@ -32,31 +32,6 @@
#include <vlc_plugin.h>
#include <vlc_codec.h>
-static int Open(vlc_object_t *);
-
-vlc_module_begin()
- set_description(N_("XWD image decoder"))
- set_capability("video decoder", 50)
- set_category(CAT_INPUT)
- set_subcategory(SUBCAT_INPUT_VCODEC)
- set_callback(Open)
-vlc_module_end()
-
-static int Decode(decoder_t *, block_t *);
-
-static int Open(vlc_object_t *obj)
-{
- decoder_t *dec = (decoder_t *)obj;
-
- if (dec->fmt_in.i_codec != VLC_CODEC_XWD)
- return VLC_EGENERIC;
-
- dec->pf_decode = Decode;
- es_format_Copy(&dec->fmt_out, &dec->fmt_in);
- dec->fmt_out.i_codec = VLC_CODEC_RGB32;
- return VLC_SUCCESS;
-}
-
static int Decode (decoder_t *dec, block_t *block)
{
picture_t *pic = NULL;
@@ -152,3 +127,24 @@ drop:
decoder_QueueVideo(dec, pic);
return VLCDEC_SUCCESS;
}
+
+static int Open(vlc_object_t *obj)
+{
+ decoder_t *dec = (decoder_t *)obj;
+
+ if (dec->fmt_in.i_codec != VLC_CODEC_XWD)
+ return VLC_EGENERIC;
+
+ dec->pf_decode = Decode;
+ es_format_Copy(&dec->fmt_out, &dec->fmt_in);
+ dec->fmt_out.i_codec = VLC_CODEC_RGB32;
+ return VLC_SUCCESS;
+}
+
+vlc_module_begin()
+ set_description(N_("XWD image decoder"))
+ set_capability("video decoder", 50)
+ set_category(CAT_INPUT)
+ set_subcategory(SUBCAT_INPUT_VCODEC)
+ set_callback(Open)
+vlc_module_end()
More information about the vlc-commits
mailing list