Commit 98c2db7e authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

ext/ffmpeg/gstffmpegcodecmap.c: Prevent likely segfault on EMPTY provided caps.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_with_codecid):
Prevent likely segfault on EMPTY provided caps.
parent ffaf42c1
2008-07-11 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_with_codecid):
Prevent likely segfault on EMPTY provided caps.
2008-07-06 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Based on a patch by: Aurelien Grimaud <gstelzz at yahoo dot fr>
......
common @ 79ade7b9
Subproject commit 593bb114c6f5c32b529aa6443be4c2d60d6484c7
Subproject commit 79ade7b9c9bf47eee491ceee4cf3ea116140ad35
......@@ -1598,13 +1598,15 @@ void
gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
enum CodecType codec_type, const GstCaps * caps, AVCodecContext * context)
{
GstStructure *str = gst_caps_get_structure (caps, 0);
GstStructure *str;
const GValue *value;
const GstBuffer *buf;
if (!context)
if (!context || !gst_caps_get_size (caps))
return;
str = gst_caps_get_structure (caps, 0);
/* extradata parsing (esds [mpeg4], wma/wmv, msmpeg4v1/2/3, etc.) */
if ((value = gst_structure_get_value (str, "codec_data"))) {
gint size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment