[Ffmpeg-devel] DV decoding crash [ plus PATCHES]

Roman Shaposhnik Roman.Shaposhnick
Tue Jan 3 08:50:08 CET 2006


Hi Steven!

On Sat, Dec 31, 2005 at 10:17:19AM -0800, Steven M. Schultz wrote:
> > 	It looks like the massive changes over the last couple days
> > 	broke DV decoding.
> 
> 	With talk of an impending release I'd think that fixing a 
> 	segfault would be of interest ;)

   That's for sure!

> > 	In libavcodec/dv.c  the 'dv_anchor' array was made part of
> > 	'DVVideoContext' - a "per context" (thread?) structure.  However,
> > 	'dv_anchor' is only initialized in the "global" context.
> 
> 	The problem manifests itself on the 2nd call to avcodec_open()
> 	within a program.

  Got it.

> 	I have attached 2 patches from which to choose.  The first restores
> 	the "global to DV codec" behaviour of dv_anchor.  The second
> 	allocates an identical array for each DVVideoContext. 

  Well, my personal opinion is that we shouldn't waste extra space
  with the per context dv_anchor. Now, restoring it to the global 
  context is pretty much what we need, since it is really a sort
  of a "static" structure. Given the amount of static stuff in DV
  can we go to the extreme of:
    
    dv_anchor[324] = { 1, 2, 3, ..., 324};

  If not, could somebody, please remind me if there's a hook for the event
  of the entire libavcodec closing/"exiting" ?

Thanks,
Roman.





More information about the ffmpeg-devel mailing list