[vlc-devel] [PATCHv11] dcp: Creation of access-demux module for DCP

Denis Charmet typx at dinauz.org
Tue Dec 10 13:12:21 CET 2013


Le mardi 10 décembre 2013 à 12:16:29, Nicolas Bertrand a écrit :
> Le 05/12/2013 15:33, Denis Charmet a écrit :
> >>+    switch( p_sys->PictureEssType )
> >>>+    {
> >>>+        case ESS_UNKNOWN:
> >>>+            msg_Err( p_demux, "The file %s is not a supported AS_DCP essence container", p_sys->p_dcp->videofile.c_str() );
> >>>+            retval = VLC_EGENERIC;
> >>>+            goto error;
> >>>+
> >>>+        case ESS_JPEG_2000:
> >>>+        case ESS_JPEG_2000_S: {
> >>>+            JP2K::PictureDescriptor * p_PicDesc = new ( nothrow ) JP2K::PictureDescriptor();
> >I'd let the descriptors on the stack. Except if they are too big.
> When Its declared here its not in the stack ?
new allocates on the heap

You can try with JP2K::PictureDescriptor PicDesc();
and then use PicDesc.foo instead of p_PicDesc->foo and remove the
delete. But that's more nitpicking than a real problem.

Regards,

-- 
Denis Charmet - TypX
Le mauvais esprit est un art de vivre



More information about the vlc-devel mailing list