[DVDnav-discuss] [PATCH] src/dvdread/ifo_types.h: fix structure cell_playback_t.

Jean-Baptiste Kempf jb at videolan.org
Tue Sep 1 15:46:48 CEST 2015


That does not justify an ABI break for everyone.
Fix your compiler.

On 03 Jun, sayurin wrote :
> Unsigned int bit fields allocate 4bytes. Trancating by __attribute__
> ((packed)) is only __GNUC__ extension. Other compilers (for example MSVC)
> do not work properly because of this size mismatch.
> 
> 2015年6月2日(火) 23:15 Jean-Baptiste Kempf <jb at videolan.org>:
> 
> > This is an ABI break. Why do you need that?
> >
> > On 02 Jun, sayurin wrote :
> > > Structure cell_playback_t is broken because of wrong member size.
> > >
> > > diff --git a/src/dvdread/ifo_types.h b/src/dvdread/ifo_types.h
> > > index 33f0346..8682ab2 100644
> > > --- a/src/dvdread/ifo_types.h
> > > +++ b/src/dvdread/ifo_types.h
> > > @@ -209,16 +209,16 @@ typedef uint8_t pgc_program_map_t;
> > >   * Cell Playback Information.
> > >   */
> > >  typedef struct {
> > > -  unsigned int block_mode       : 2;
> > > -  unsigned int block_type       : 2;
> > > -  unsigned int seamless_play    : 1;
> > > -  unsigned int interleaved      : 1;
> > > -  unsigned int stc_discontinuity: 1;
> > > -  unsigned int seamless_angle   : 1;
> > > +  unsigned char block_mode       : 2;
> > > +  unsigned char block_type       : 2;
> > > +  unsigned char seamless_play    : 1;
> > > +  unsigned char interleaved      : 1;
> > > +  unsigned char stc_discontinuity: 1;
> > > +  unsigned char seamless_angle   : 1;
> > >
> > > -  unsigned int playback_mode    : 1;  /**< When set, enter StillMode
> > after
> > > each VOBU */
> > > -  unsigned int restricted       : 1;  /**< ?? drop out of fastforward?
> > */
> > > -  unsigned int unknown2         : 6;
> > > +  unsigned char playback_mode    : 1;  /**< When set, enter StillMode
> > > after each VOBU */
> > > +  unsigned char restricted       : 1;  /**< ?? drop out of fastforward?
> > */
> > > +  unsigned char unknown2         : 6;
> > >    uint8_t still_time;
> > >    uint8_t cell_cmd_nr;
> > >    dvd_time_t playback_time;
> > >
> > > --
> > > Kurata Sayuri
> > > _______________________________________________
> > > DVDnav-discuss mailing list
> > > DVDnav-discuss at mplayerhq.hu
> > > https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
> >
> > --
> > With my kindest regards,
> >
> > --
> > Jean-Baptiste Kempf
> > http://www.jbkempf.com/ - +33 672 704 734
> > Sent from my Electronic Device
> > _______________________________________________
> > DVDnav-discuss mailing list
> > DVDnav-discuss at mplayerhq.hu
> > https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
> >
> _______________________________________________
> DVDnav-discuss mailing list
> DVDnav-discuss at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the DVDnav-discuss mailing list