[Pkg-scicomp-devel] Bug#487638: opencv patch for libavcodec/ffmpeg api

Thomas Viehmann tv at beamnet.de
Tue Jul 7 06:54:08 UTC 2009


Hi Gijs and Nicolau,

(And hi Raphael, you are the last NMUer. Maybe you are interested in 
uploading a fixed package with a revised version of Gijs patch, if not, 
maybe Paul or Ondrej want to.)

first, and most importantly, thanks for looking into fixing this problem 
and sharing your patch with Debian.

Just a quick technical comment:
The use of a static variable for the scaling context seems bogus. 
Similarly, allocating a context in icvRetreiveFrame seems too often. 
Also, not releasing it looks wrong.

What should be done instead is amend the (internal) struct 
CvCaptureAVI_FFMPEG with the SwsContext (I'd name the struct member 
sws_context rather than img_conver_context, too, but that could be me), 
AFAICT this should not change the exported ABI. Then initialize the 
context in icvOpenAVI_FFMPEG and give it back in icvCloseAVI_FFMPEG.

This is, of course, along the lines of "don't use static vars where you 
should not".

I have not reviewed any other aspect of the patch.

Again, thanks for looking into fixing this bug. Let me know if I can be 
of further assistance.

Kind regards

T.
-- 
Thomas Viehmann, http://thomas.viehmann.net/





More information about the Pkg-scicomp-devel mailing list