[gst-devel] valgrind reports

Vincent Torri Vincent.Torri at iecn.u-nancy.fr
Sun Apr 17 00:24:06 CEST 2005


Hello,

I'm writing a program that tries get the frames of a video. First, i need
to know the informations of the streams. So, I basically create a pipeline
with a file source and a decodebin elements, i iterate and i wait for the
pads to be created.

My test file is an .ogm one with one xvid video stream and 2 vorbis
streams.
I have installed gstreamer, gst-plugins and gst-ffmpeg cvs, branch 0.8

If I just iterate the pipeline with no pad detection, there's no crash
If I iterate the pipeline with the pad detection, it crashes always at the
same time (28 iterations), with apparently a call of malloc(-1)

A better description of what i do :

1) i iterate the pipeline to find all the streams and i set the pipeline
to READY. I don't build the whole pipeline. As parameters, I have an audio
and video stream index. If these parameters can't correspond to a stream,
they are set to 0 (that is, the first streams).

2) I iterate again to build the pipeline according to these parameters (i
check if the streams that i find correspond to the parameters).

The program crashes after 28 iterations in the 2nd step.

so i've tested on the video file with a simple program that i've done
(gspot like, called esi) and which doesn't crash. But when I run valgrind
on this program, there's a lot of messages.

valgrind logfile :
http://www.iecn.u-nancy.fr/~torri/files/gst_pb/valgrind_esi.log

program that i use :
http://www.iecn.u-nancy.fr/~torri/files/gst_pb/esi-0.2.tar.bz2

part of the program that crashes :
http://www.iecn.u-nancy.fr/~torri/files/gst_pb/gstreamersource.h
http://www.iecn.u-nancy.fr/~torri/files/gst_pb/gstreamersource.cpp

Also note that there is a memory leak with xml (line 1458 of the logfile).
I've read
(http://mail.gnome.org/archives/gdome/2004-November/msg00003.html) that
xmlCleanupParser() should be called when xml is not used anymore.

My questions are:

1) Are the problems reported by valgrind known ?

2) Do I do something wrong when I try to get the informations (in esi, or
in the program that crashes) ? (for esi, see src/lib/esi.c and
src/bin/esi_cli.c)

Thank you

Vincent Torri




More information about the gstreamer-devel mailing list