[gst-devel] caps dump causing memory exeption

Stefan Kost ensonic at hora-obscura.de
Fri Oct 29 17:29:01 CEST 2010


Am 27.10.2010 04:06, schrieb Feng Ye:
> Hello,
> 
>  
> 
> I try to dump out the caps in the setcaps function like below and it gives fatal
> memory exception:


Would be nice to get a backtrace from gdb. If you can't get one. I'd suggest to
test the log function separately, e.g.

GstCaps *test_caps = gst_caps_from_string("video/x-raw-yuv,....");
GST_DEBUG_OBJECT (dec, "setcaps:     %" GST_PTR_FORMAT, test_caps);
gst_caps_unref(test_caps);

Stefan

> 
>  
> 
> static gboolean hantro_dec_setcaps (GstPad * pad, GstCaps * caps) {
> 
>> 
>     GST_DEBUG_OBJECT (dec, "setcaps:     %" GST_PTR_FORMAT, caps);
> 
>   Or:    GST_LOG ("setcaps:     %" GST_PTR_FORMAT, caps);
> 
>  
> 
> The caps itself is not null, and it contains valid info, like width and height,
> which I can use this to get:
> 
>   structure = gst_caps_get_structure (caps, 0);
> 
>   width  = gst_structure_get_value (structure, "width");
> 
>  
> 
> As long as I don’t dump my code runs fine. I am not sure what’s the reason.
> 
>  
> 
>  
> 
> Thanks,
> 
> Feng
> 
>  
> 
> 
> 
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
> http://p.sf.net/sfu/nokia-dev2dev
> 
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list