[MPlayer-cvslog] r31954 - trunk/stream/stream_bd.c
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Thu Aug 12 18:27:40 CEST 2010
On Thu, Aug 12, 2010 at 01:31:42PM +0200, Diego Biurrun wrote:
> On Tue, Aug 10, 2010 at 03:28:18PM +0200, reimar wrote:
> >
> > Log:
> > Avoid pointless additional string pointers.
> >
> > --- trunk/stream/stream_bd.c Tue Aug 10 15:26:19 2010 (r31953)
> > +++ trunk/stream/stream_bd.c Tue Aug 10 15:28:18 2010 (r31954)
> > @@ -31,10 +31,10 @@
> >
> > -static const char *BD_UKF_PATH = "/%s/AACS/Unit_Key_RO.inf";
> > -static const char *BD_M2TS_PATH = "/%s/BDMV/STREAM/%05d.m2ts";
> > +static const char BD_UKF_PATH[] = "/%s/AACS/Unit_Key_RO.inf";
> > +static const char BD_M2TS_PATH[] = "/%s/BDMV/STREAM/%05d.m2ts";
>
> I'm curious, what are the advantages of this change?
With optimizations probably none, but if the compiler did not optimize
or it wasn't static, it would save the memory for a dereference and
doing the actual dereference.
In particular since the pointer themselves would not have been stored
in rodata like this due to a missing const, making this solution
also simpler.
More information about the MPlayer-cvslog
mailing list