diff mbox series

[FFmpeg-devel,04/17] avformat/mxfenc: Use smaller types to make struct smaller

Message ID AM7PR03MB6660BDC479E84332870B53FC8F929@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 25ddf888d8bac2a9c55a18f9651f27a62d50e2fb
Headers show
Series [FFmpeg-devel,01/17] avformat/mxfenc: Auto-insert h264_mp4toannexb BSF if needed | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 9, 2021, 6:01 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/mxfenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tomas Härdin Nov. 9, 2021, 9:09 p.m. UTC | #1
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavformat/mxfenc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> index d1c4d43a50..3b6604d0d6 100644
> --- a/libavformat/mxfenc.c
> +++ b/libavformat/mxfenc.c
> @@ -2203,9 +2203,9 @@ static int mxf_parse_dv_frame(AVFormatContext
> *s, AVStream *st, AVPacket *pkt)
>  static const struct {
>      UID uid;
>      int frame_size;
> -    int profile;
> +    uint8_t profile;
>      uint8_t interlaced;
> -    int intra_only; // 1 or 0 when there are separate UIDs for Long
> GOP and Intra, -1 when Intra/LGOP detection can be ignored
> +    int8_t intra_only; // 1 or 0 when there are separate UIDs for

Looks OK, and should work as intended since they're at the end of the
struct.

/Tomas
diff mbox series

Patch

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index d1c4d43a50..3b6604d0d6 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -2203,9 +2203,9 @@  static int mxf_parse_dv_frame(AVFormatContext *s, AVStream *st, AVPacket *pkt)
 static const struct {
     UID uid;
     int frame_size;
-    int profile;
+    uint8_t profile;
     uint8_t interlaced;
-    int intra_only; // 1 or 0 when there are separate UIDs for Long GOP and Intra, -1 when Intra/LGOP detection can be ignored
+    int8_t intra_only; // 1 or 0 when there are separate UIDs for Long GOP and Intra, -1 when Intra/LGOP detection can be ignored
 } mxf_h264_codec_uls[] = {
     {{ 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0a,0x04,0x01,0x02,0x02,0x01,0x31,0x11,0x01 },      0,  66, 0, -1 }, // AVC Baseline
     {{ 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0a,0x04,0x01,0x02,0x02,0x01,0x31,0x20,0x01 },      0,  77, 0, -1 }, // AVC Main