mpegvideoparse: check width/height range

Checks if the width/height that are to be set on src pad caps
are within valid range of [16,4096]
This commit is contained in:
Thiago Santos 2009-10-20 10:57:28 -03:00 committed by Thiago Santos
parent 8db2821791
commit 1069712438

View file

@ -243,6 +243,13 @@ mpegvideoparse_handle_sequence (MpegVideoParse * mpegvideoparse,
if (G_UNLIKELY (!mpeg_util_parse_sequence_hdr (&new_hdr, cur, end)))
return FALSE;
if (new_hdr.width < 16 || new_hdr.width > 4096 ||
new_hdr.height < 16 || new_hdr.height > 4096) {
GST_WARNING_OBJECT (mpegvideoparse, "Width/height out of valid range "
"[16, 4096]");
return FALSE;
}
if (memcmp (&mpegvideoparse->seq_hdr, &new_hdr, sizeof (MPEGSeqHdr)) != 0) {
GstCaps *caps;
GstBuffer *seq_buf;