[vlc-devel] [PATCH] chromecast: fix deprecation warning

Alexandre Janniaux ajanni at videolabs.io
Thu Jan 21 10:18:07 UTC 2021


Hi,

Right, I'll fix it, sorry for the overlook!

Regards,
--
Alexandre Janniaux
Videolabs

On Thu, Jan 21, 2021 at 11:16:33AM +0100, Thomas Guillem wrote:
>
>
> On Thu, Jan 21, 2021, at 11:02, Alexandre Janniaux wrote:
> > ByteSizeLong is available since 2016-09-23 version 3.1.0 according to
> > protobuf CHANGES.txt.
> > ---
> >  modules/stream_out/chromecast/chromecast_communication.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/modules/stream_out/chromecast/chromecast_communication.cpp
> > b/modules/stream_out/chromecast/chromecast_communication.cpp
> > index 347a15dbc6..e244bbe818 100644
> > --- a/modules/stream_out/chromecast/chromecast_communication.cpp
> > +++ b/modules/stream_out/chromecast/chromecast_communication.cpp
> > @@ -437,7 +437,7 @@ unsigned
> > ChromecastCommunication::msgPlayerSetVolume( const std::string& destina
> >   */
> >  int ChromecastCommunication::sendMessage( const
> > castchannel::CastMessage &msg )
> >  {
> > -    int i_size = msg.ByteSize();
> > +    int i_size = msg.ByteSizeLong();
>
> size_t ByteSizeLong();
>
> i_size should be a size_t then.
>
> >      uint8_t *p_data = new(std::nothrow) uint8_t[PACKET_HEADER_LEN +
> > i_size];
> >      if (p_data == NULL)
> >          return VLC_ENOMEM;
> > --
> > 2.30.0
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list