rawbaseparse: Assert that frame size is > 0
authorSebastian Dröge <sebastian@centricular.com>
Tue, 28 Feb 2017 13:51:00 +0000 (15:51 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 28 Feb 2017 13:51:00 +0000 (15:51 +0200)
We would later divide by zero otherwise, and generally won't do the
right thing.

CID 1401383

gst/rawparse/gstrawbaseparse.c

index b41e4fa..2e7e705 100644 (file)
@@ -525,6 +525,7 @@ gst_raw_base_parse_handle_frame (GstBaseParse * parse,
   frame_size =
       klass->get_config_frame_size (raw_base_parse,
       GST_RAW_BASE_PARSE_CONFIG_CURRENT);
+  g_assert (frame_size > 0);
 
   in_size = gst_buffer_get_size (frame->buffer);