rmdemux: Make sure we have enough data available when parsing audio/video packets
rmdemux: Make sure we have enough data available when parsing audio/video packets

Otherwise there will be out-of-bounds reads and potential crashes.

Thanks to Natalie Silvanovich for reporting.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/37

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/74>

GStreamer/gst-plugins-ugly,GStreamer/gst-plugins-ugly,GStreamer/gst-plugins-ugly