mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
ext/mpeg2dec/gstmpeg2dec.c: Don't allow width/height outside the spec (i.e. smaller than 16 and higher than 4096). Su...
Original commit message from CVS: * ext/mpeg2dec/gstmpeg2dec.c: (handle_sequence): Don't allow width/height outside the spec (i.e. smaller than 16 and higher than 4096). Such files are corrupted ones and setting caps that are not a subset of the template caps confuses playbin. Fixes bug #542646.
This commit is contained in:
parent
5352800cc1
commit
171116f99a
3 changed files with 18 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-07-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
* ext/mpeg2dec/gstmpeg2dec.c: (handle_sequence):
|
||||
Don't allow width/height outside the spec (i.e. smaller than 16
|
||||
and higher than 4096). Such files are corrupted ones and setting
|
||||
caps that are not a subset of the template caps confuses playbin.
|
||||
Fixes bug #542646.
|
||||
|
||||
2008-07-11 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
* ext/sidplay/Makefile.am:
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 79ade7b9c9bf47eee491ceee4cf3ea116140ad35
|
||||
Subproject commit a100efef186a5f8999fe3aa42c0720f5123c08eb
|
|
@ -626,6 +626,15 @@ handle_sequence (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info)
|
|||
mpeg2dec->decoded_height = info->sequence->height;
|
||||
mpeg2dec->total_frames = 0;
|
||||
|
||||
/* mpeg2 video can only be from 16x16 to 4096x4096. Everything
|
||||
* else is a corrupted files */
|
||||
if (mpeg2dec->width > 4096 || mpeg2dec->width < 16 ||
|
||||
mpeg2dec->height > 4096 || mpeg2dec->height < 16) {
|
||||
GST_ERROR_OBJECT (mpeg2dec, "Invalid frame dimensions: %d x %d",
|
||||
mpeg2dec->width, mpeg2dec->height);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
/* set framerate */
|
||||
mpeg2dec->fps_n = 27000000;
|
||||
mpeg2dec->fps_d = info->sequence->frame_period;
|
||||
|
|
Loading…
Reference in a new issue