diff mbox series

[FFmpeg-devel] avformat/mxfenc: Reorder fields in MXFIndexEntry to make it smaller

Message ID 20200313101840.11994-1-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel] avformat/mxfenc: Reorder fields in MXFIndexEntry to make it smaller | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt March 13, 2020, 10:18 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/mxfenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tomas Härdin March 14, 2020, 10:21 a.m. UTC | #1
fre 2020-03-13 klockan 11:18 +0100 skrev Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/mxfenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> index 5e0dc0e889..55c715d776 100644
> --- a/libavformat/mxfenc.c
> +++ b/libavformat/mxfenc.c
> @@ -72,10 +72,10 @@ typedef struct MXFLocalTagPair {
>  } MXFLocalTagPair;
>  
>  typedef struct MXFIndexEntry {
> -    uint8_t flags;
>      uint64_t offset;
>      unsigned slice_offset; ///< offset of audio slice
>      uint16_t temporal_ref;
> +    uint8_t flags;
>  } MXFIndexEntry;
>  
>  typedef struct MXFStreamContext {

Good catch. Looks fine. I took a look at the fields in the struck, and
it doesn't seem like we can shrink any of them without limiting what
the muxer can currently do.

/Tomas
Michael Niedermayer March 14, 2020, 5:24 p.m. UTC | #2
On Sat, Mar 14, 2020 at 11:21:51AM +0100, Tomas Härdin wrote:
> fre 2020-03-13 klockan 11:18 +0100 skrev Andreas Rheinhardt:
> > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> > ---
> >  libavformat/mxfenc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> > index 5e0dc0e889..55c715d776 100644
> > --- a/libavformat/mxfenc.c
> > +++ b/libavformat/mxfenc.c
> > @@ -72,10 +72,10 @@ typedef struct MXFLocalTagPair {
> >  } MXFLocalTagPair;
> >  
> >  typedef struct MXFIndexEntry {
> > -    uint8_t flags;
> >      uint64_t offset;
> >      unsigned slice_offset; ///< offset of audio slice
> >      uint16_t temporal_ref;
> > +    uint8_t flags;
> >  } MXFIndexEntry;
> >  
> >  typedef struct MXFStreamContext {
> 
> Good catch. Looks fine. I took a look at the fields in the struck, and
> it doesn't seem like we can shrink any of them without limiting what
> the muxer can currently do.

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 5e0dc0e889..55c715d776 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -72,10 +72,10 @@  typedef struct MXFLocalTagPair {
 } MXFLocalTagPair;
 
 typedef struct MXFIndexEntry {
-    uint8_t flags;
     uint64_t offset;
     unsigned slice_offset; ///< offset of audio slice
     uint16_t temporal_ref;
+    uint8_t flags;
 } MXFIndexEntry;
 
 typedef struct MXFStreamContext {