[FFmpeg-devel] [PATCH] Using struct for StyleRecords and implementing support for large boxes(>32 bit) for 3gpp timed text
Philip Langdale
philipl at overt.org
Sun Apr 26 07:16:06 CEST 2015
On Sun, 26 Apr 2015 05:04:07 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sun, Apr 26, 2015 at 08:22:56AM +0530, Niklesh Lalwani wrote:
> > On Sun, Apr 26, 2015 at 6:56 AM, Michael Niedermayer
> > <michaelni at gmx.at>
> > > wrote:
> > >
> > >>
> > >> > +struct __attribute__((__packed__)) StyleRecord {
> > >
> > >
> > >> you cant do this
> > >
> > > attribute packed is not ANSI/ISO C
> > >
> > >
> > >> How do I implement packed structures then here? ( since I don't
> > >> want
> > padding for proper alignment with the text sample)
>
> you cant create packed structs, theres no portable way to do so
> also there likely would be issues on either big or little endian
> with such structs if they where used for reading data
You're right. This was my suggestion. Niklesh - you can still use the
struct, but you'd have to read the members of the struct out one by
one. It's not clear whether that provides any meaningful benefit. You
still end up losing the benefit of being able to directly address the
styles. I think we have to abandon this approach. Sorry.
--phil
More information about the ffmpeg-devel
mailing list