Commit graph

23 commits

Author SHA1 Message Date
Sebastian Dröge
807e23118b vmncdec: Sanity-check rectangle sizes a bit more thorough
The x/y coordinates could already be bigger than the configured
width/height, and adding the rectangle width/height could cause an
overflow.
2016-12-06 07:59:51 +02:00
Sebastian Dröge
4cb1bcf142 vmncdec: Sanity-check width/height before using it
We will allocate a screen area of width*height*bpp bytes, however this
calculation can easily overflow if too high width or height are given
inside the stream. Nonetheless we would just assume that enough memory
was allocated, try to fill it and overwrite as much memory as wanted.

Also allocate the screen area filled with zeroes to ensure that we start
with full-black and not any random (or not so random) data.

https://scarybeastsecurity.blogspot.gr/2016/11/0day-poc-risky-design-decisions-in.html

Ideally we should just remove this plugin in favour of the one in
gst-libav, which generally seems to be of better code quality.

https://bugzilla.gnome.org/show_bug.cgi?id=774533
2016-11-16 20:41:39 +02:00
Nicolas Dufresne
50537e2c08 vmncdec: Wait for segment event before checking it
The heuristic to choose between packetise or not was changed to use the
segment format. The problem is that this change is reading the segment
during the caps event handling. The segment event will only be sent
after. That prevented the decoder to go in packetize mode, and avoid
useless parsing.

https://bugzilla.gnome.org/show_bug.cgi?id=736252
2016-06-07 21:05:41 -04:00
Vineeth TM
8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Thiago Santos
a5ed877783 videodecoders: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query

Elements: daaladec, libde265dec, openjpegdec, rsvgdec, schrodec,
          webpdec, pnmdec, vmncdec, openexrdec
2015-08-15 13:51:16 -03:00
Luis de Bethencourt
925b65b02e Rename property enums from ARG_ to PROP_
Property enum items should be named PROP_ for consistency and readability.
2015-04-27 10:55:18 +01:00
Vineeth T M
5294a68122 vmncdec: modify wrong packetized mode logic
packetized mode is being set when framerate is being set
which is not correct. Changing the same by checking the
input segement format. If input segment is in TIME it is
Packetized, and if it is in BYTES it is not.

https://bugzilla.gnome.org/show_bug.cgi?id=736252
2014-09-16 11:24:53 +03:00
Edward Hervey
93ef3f9b24 vmndec: Don't leak output state
_set_output_state returns a reference to the codec state.

CID #1212170
2014-05-13 11:38:44 +02:00
Olivier Crête
4a5a1e568e vmcndec: Add missing header file
Forgot to add header file to previou commit
2013-12-06 21:11:32 -05:00
Olivier Crête
60d3af6fbd vmncdec: Port to GStreamer 1.0 API 2013-12-06 20:58:48 -05:00
Tim-Philipp Müller
9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Tim-Philipp Müller
32ba17cd0f Use gst_element_class_set_static_metadata()
where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.
2012-10-17 17:46:34 +01:00
Mark Nauwelaerts
578861abea replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2012-09-14 17:27:49 +02:00
Sebastian Dröge
cda192b3b7 gst: Update for GST_PLUGIN_DEFINE() API changes 2012-04-05 18:02:56 +02:00
Benjamin Otte
f96e4f1581 Add -Wmissing-declarations -Wmissing-prototypes to configure flags
And fix all warnings
2010-03-21 21:39:18 +01:00
Benjamin Otte
775c7584fd gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 22:46:41 +01:00
Benjamin Otte
87dbb0ab9d wmnc: Update description 2010-03-09 19:16:30 +01:00
Tim-Philipp Müller
ee65cabbb3 vmnc: use existing macros to avoid alignment issues 2010-01-11 01:01:46 +00:00
Jan Schmidt
8792203e39 Fix some finalize leaks by chaining up to the parent method.
Original commit message from CVS:
* ext/xvid/gstxvidenc.c:
* gst/vmnc/vmncdec.c:
* sys/glsink/glimagesink.c:
* sys/glsink/gstgldisplay.c:
Fix some finalize leaks by chaining up to the parent method.
2008-02-12 10:22:42 +00:00
Ian Munro
78a7ce11d9 gst/bayer/gstbayer2rgb.c: Include our own "_stdint.h" instead of <stdint.h> (which may not be available).
Original commit message from CVS:
Patch by: Ian Munro  <imunro at netspace net au>
* gst/bayer/gstbayer2rgb.c:
Include our own "_stdint.h" instead of <stdint.h> (which may not
be available).
* gst/speed/gstspeed.h:
Native HP-UX compiler dosn't seem to like enum typedefs before the
actual enum was defined.
* gst/vmnc/vmncdec.c:
Fix wrong usage of GST_ELEMENT_ERROR macro (#461373).
2007-07-30 09:52:36 +00:00
Tim-Philipp Müller
9b07457ff7 gst/: Fix build against core CVS.
Original commit message from CVS:
* gst/interleave/deinterleave.c: (gst_deinterleave_process):
* gst/vmnc/vmncdec.c: (vmnc_make_buffer):
Fix build against core CVS.
2007-07-11 23:43:25 +00:00
Michael Smith
628d19135f gst/vmnc/vmncdec.c: Redesign to include a parser for raw files (no timestamps in that mode yet, though).
Original commit message from CVS:
* gst/vmnc/vmncdec.c: (gst_vmnc_dec_class_init),
(gst_vmnc_dec_init), (vmnc_dec_finalize), (gst_vmnc_dec_reset),
(vmnc_handle_wmvi_rectangle), (render_colour_cursor),
(render_cursor), (vmnc_make_buffer), (vmnc_handle_wmvd_rectangle),
(vmnc_handle_wmve_rectangle), (vmnc_handle_wmvf_rectangle),
(vmnc_handle_wmvg_rectangle), (vmnc_handle_wmvh_rectangle),
(vmnc_handle_wmvj_rectangle), (render_raw_tile), (render_subrect),
(vmnc_handle_raw_rectangle), (vmnc_handle_copy_rectangle),
(vmnc_handle_hextile_rectangle), (vmnc_handle_packet),
(vmnc_dec_setcaps), (vmnc_dec_chain_frame), (vmnc_dec_chain),
(vmnc_dec_set_property), (vmnc_dec_get_property):
Redesign to include a parser for raw files (no timestamps in that
mode yet, though).
2007-03-23 18:41:52 +00:00
Michael Smith
1a428b03ed Add VMnc decoder.
Original commit message from CVS:
* configure.ac:
* gst/vmnc/Makefile.am:
* gst/vmnc/vmncdec.c: (gst_vmnc_dec_base_init),
(gst_vmnc_dec_class_init), (gst_vmnc_dec_init),
(gst_vmnc_dec_reset), (vmnc_handle_wmvi_rectangle),
(render_colour_cursor), (render_cursor), (vmnc_make_buffer),
(vmnc_handle_wmvd_rectangle), (vmnc_handle_wmve_rectangle),
(vmnc_handle_wmvf_rectangle), (vmnc_handle_wmvg_rectangle),
(vmnc_handle_wmvh_rectangle), (vmnc_handle_wmvj_rectangle),
(render_raw_tile), (render_subrect), (vmnc_handle_raw_rectangle),
(vmnc_handle_hextile_rectangle), (vmnc_handle_packet),
(vmnc_dec_setcaps), (vmnc_dec_chain), (vmnc_dec_change_state),
(vmnc_dec_set_property), (vmnc_dec_get_property), (plugin_init):
Add VMnc decoder.
Still missing support for:
- rectangle types I didn't find in my samples (e.g. copy, RRE,
ZRLE)
- alpha-composited cursors
2007-03-03 22:13:22 +00:00