linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] mediastreamer2 - vedeoenc.c error


From: Ерохин Андрей
Subject: [Linphone-developers] mediastreamer2 - vedeoenc.c error
Date: Wed, 21 Jan 2015 16:09:38 +0300

Hello,

I found some kind of error in mediastreamer's video encoder:

When it runs in h263 mode (at least), it stores each encoded frame in 
'comp_buf', which is allocated in 'init' method and destroyed in 'uninit' 
method of the filter. After encoding, this filter splits 'comp_buf' with use of 
'dupb()' function. This function creates new mblk_t, but it's data pointer is 
set to original mblk_t's data pointer. So all output blocks from video encoder 
always point to the same memory location (only offset is different).

It's OK if all output of encoder is consumed by msrtp before encoder will start 
processing of new video frame. But in case of delay between encoder and msrtp 
(p.e. postprocessing of h263 stream in another thread), previous output will be 
garbaged with new data.

So why don't just allocate new comp_buf every time before processing of new 
video frame? Is this too slow operation?

Thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]