diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-12-01 14:30:49 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-12-05 11:06:43 +0200 |
commit | 986b60a48f1cfd6a1ef5d5f4dea8e0a8f782d389 (patch) | |
tree | a470bcef3ad418234ddf65fe7332e294059ca4d9 | |
parent | 23d07a1ed6aca7af4640eb60e8fd5e97d7b267c0 (diff) | |
download | gstreamer-plugins-good-986b60a48f1cfd6a1ef5d5f4dea8e0a8f782d389.tar.gz |
qtdemux: Ensure that size of the pasp atom is as much as we need
https://bugzilla.gnome.org/show_bug.cgi?id=775455
-rw-r--r-- | gst/isomp4/qtdemux.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 942aa6779..5507b1bd3 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -9718,9 +9718,15 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) if (pasp) { const guint8 *pasp_data = (const guint8 *) pasp->data; + gint len = QT_UINT32 (pasp_data); - stream->par_w = QT_UINT32 (pasp_data + 8); - stream->par_h = QT_UINT32 (pasp_data + 12); + if (len == 16) { + stream->par_w = QT_UINT32 (pasp_data + 8); + stream->par_h = QT_UINT32 (pasp_data + 12); + } else { + stream->par_w = 0; + stream->par_h = 0; + } } else { stream->par_w = 0; stream->par_h = 0; |