Possible Memory Leak with SMEM

About encoding, codec settings, muxers and filter usage
StefanKunze
New Cone
New Cone
Posts: 2
Joined: 18 Jun 2014 16:19

Possible Memory Leak with SMEM

Postby StefanKunze » 18 Jun 2014 16:30

Hello,
I´m actually facing a possible memory leak with the vlc lib.

What I´m doing:
- Reading a rtsp stream from a webcam - url rtsp://192.168.0.1:554/axis-media/media.amp?resolution=1280x720&compression=50&fps=20" (as some of you can see its an axis camera).
- this one I want to read with vlc so I start the vlc instance with following arguments:

Code: Select all

char smem_options[1000]; sprintf(smem_options, "#transcode{vcodec=RV32,fps=%d,width=%d,height=%d}:smem{audio-prerender-callback=%lld,video-prerender-callback=%lld,audio-postrender-callback=%lld,video-postrender-callback=%lld,audio-data=%lld,video-data=%lld}", m_FPS, m_ImageSizeX, m_ImageSizeY, (long long int) (intptr_t) (void *) &lockAudio, (long long int) (intptr_t) (void *) &lockVideo, (long long int) (intptr_t) (void *) &unlockAudio, (long long int) (intptr_t) (void *) &unlockVideo, (long long int) (intptr_t) (void *) &s_AudioData, (long long int) (intptr_t) (void *) &s_VideoData ); /* Set arguments */ const char * const l_VlcArgs[] = { "-I", "dummy", // Don't use any interface "--verbose=2", // Be verbose "--no-sout-smem-time-sync", // deactivate time sync "--sout", smem_options // Stream to memory }; int l_VlcArgsLength = sizeof(l_VlcArgs) / sizeof(*l_VlcArgs); /* Create vlc instance */ m_VLCMediaInstance = libvlc_new(l_VlcArgsLength, l_VlcArgs);
-> the code works and I get a correct image into the buffer s_VideoData ( I can save the image and handle the content)

My problem is that when I start the videostreaming the buffer increases slowly - very slowy. Instead of redirecting the output of transcode to smem I tried vmem and voila -> no memory increasing!! So I guess it has something to do with smem. Can someone try to reproduce the problem?! Any ideas how to counter/verify the problem!?!? I actually the check my code and I´m sure that its not a problem on my side.

Thanks for any ideas....

Additional infos:
Win7
vlc lib version 2.1.4

StefanKunze
New Cone
New Cone
Posts: 2
Joined: 18 Jun 2014 16:19

Re: Possible Memory Leak with SMEM

Postby StefanKunze » 19 Jun 2014 14:58

Can someone of the admins put the post to the categorie Serving Streams -> VLC stream-output (sout)!?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Possible Memory Leak with SMEM

Postby Jean-Baptiste Kempf » 09 Jul 2014 03:22

Do you free the buffers?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 8 guests