Message ID | 20240123014733.30675-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 88a9142cac25a365cde0b396cca1987eca68ccb2 |
Headers | show |
Series | [FFmpeg-devel] avformat/mxfenc: Remove AVERROR² | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On 1/22/2024 10:47 PM, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavformat/mxfenc.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c > index 685c11b3a50..c67e8ff9609 100644 > --- a/libavformat/mxfenc.c > +++ b/libavformat/mxfenc.c > @@ -2656,13 +2656,13 @@ static int mxf_parse_jpeg2000_frame(AVFormatContext *s, AVStream *st, AVPacket * > > if (bytestream2_get_be16u(&g) != JPEG2000_SOC) { > av_log(s, AV_LOG_ERROR, "Mandatory SOC marker is not present\n"); > - return AVERROR(AVERROR_INVALIDDATA); > + return AVERROR_INVALIDDATA; > } > > /* Extract usefull size information from the SIZ marker */ > if (bytestream2_get_be16u(&g) != JPEG2000_SIZ) { > av_log(s, AV_LOG_ERROR, "Mandatory SIZ marker is not present\n"); > - return AVERROR(AVERROR_INVALIDDATA); > + return AVERROR_INVALIDDATA; > } > bytestream2_skip(&g, 2); // Skip Lsiz > sc->j2k_info.j2k_cap = bytestream2_get_be16u(&g); > @@ -2677,7 +2677,7 @@ static int mxf_parse_jpeg2000_frame(AVFormatContext *s, AVStream *st, AVPacket * > j2k_ncomponents = bytestream2_get_be16u(&g); > if (j2k_ncomponents != component_count) { > av_log(s, AV_LOG_ERROR, "Incoherence about components image number.\n"); > - return AVERROR(AVERROR_INVALIDDATA); > + return AVERROR_INVALIDDATA; > } > bytestream2_get_bufferu(&g, sc->j2k_info.j2k_comp_desc, 3 * j2k_ncomponents); LGTM of course.
tis 2024-01-23 klockan 02:47 +0100 skrev Michael Niedermayer: > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavformat/mxfenc.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c > index 685c11b3a50..c67e8ff9609 100644 > --- a/libavformat/mxfenc.c > +++ b/libavformat/mxfenc.c > @@ -2656,13 +2656,13 @@ static int > mxf_parse_jpeg2000_frame(AVFormatContext *s, AVStream *st, AVPacket * > > if (bytestream2_get_be16u(&g) != JPEG2000_SOC) { > av_log(s, AV_LOG_ERROR, "Mandatory SOC marker is not > present\n"); > - return AVERROR(AVERROR_INVALIDDATA); > + return AVERROR_INVALIDDATA; > } > > /* Extract usefull size information from the SIZ marker */ > if (bytestream2_get_be16u(&g) != JPEG2000_SIZ) { > av_log(s, AV_LOG_ERROR, "Mandatory SIZ marker is not > present\n"); > - return AVERROR(AVERROR_INVALIDDATA); > + return AVERROR_INVALIDDATA; > } > bytestream2_skip(&g, 2); // Skip Lsiz > sc->j2k_info.j2k_cap = bytestream2_get_be16u(&g); > @@ -2677,7 +2677,7 @@ static int > mxf_parse_jpeg2000_frame(AVFormatContext *s, AVStream *st, AVPacket * > j2k_ncomponents = bytestream2_get_be16u(&g); > if (j2k_ncomponents != component_count) { > av_log(s, AV_LOG_ERROR, "Incoherence about components image > number.\n"); > - return AVERROR(AVERROR_INVALIDDATA); > + return AVERROR_INVALIDDATA; > } > bytestream2_get_bufferu(&g, sc->j2k_info.j2k_comp_desc, 3 * > j2k_ncomponents); > OK of course /Tomas
On Tue, Jan 23, 2024 at 01:56:29PM +0100, Tomas Härdin wrote: > tis 2024-01-23 klockan 02:47 +0100 skrev Michael Niedermayer: > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > > --- > > libavformat/mxfenc.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c > > index 685c11b3a50..c67e8ff9609 100644 > > --- a/libavformat/mxfenc.c > > +++ b/libavformat/mxfenc.c > > @@ -2656,13 +2656,13 @@ static int > > mxf_parse_jpeg2000_frame(AVFormatContext *s, AVStream *st, AVPacket * > > > > if (bytestream2_get_be16u(&g) != JPEG2000_SOC) { > > av_log(s, AV_LOG_ERROR, "Mandatory SOC marker is not > > present\n"); > > - return AVERROR(AVERROR_INVALIDDATA); > > + return AVERROR_INVALIDDATA; > > } > > > > /* Extract usefull size information from the SIZ marker */ > > if (bytestream2_get_be16u(&g) != JPEG2000_SIZ) { > > av_log(s, AV_LOG_ERROR, "Mandatory SIZ marker is not > > present\n"); > > - return AVERROR(AVERROR_INVALIDDATA); > > + return AVERROR_INVALIDDATA; > > } > > bytestream2_skip(&g, 2); // Skip Lsiz > > sc->j2k_info.j2k_cap = bytestream2_get_be16u(&g); > > @@ -2677,7 +2677,7 @@ static int > > mxf_parse_jpeg2000_frame(AVFormatContext *s, AVStream *st, AVPacket * > > j2k_ncomponents = bytestream2_get_be16u(&g); > > if (j2k_ncomponents != component_count) { > > av_log(s, AV_LOG_ERROR, "Incoherence about components image > > number.\n"); > > - return AVERROR(AVERROR_INVALIDDATA); > > + return AVERROR_INVALIDDATA; > > } > > bytestream2_get_bufferu(&g, sc->j2k_info.j2k_comp_desc, 3 * > > j2k_ncomponents); > > > > OK of course will apply thx to both reviewers [...]
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 685c11b3a50..c67e8ff9609 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -2656,13 +2656,13 @@ static int mxf_parse_jpeg2000_frame(AVFormatContext *s, AVStream *st, AVPacket * if (bytestream2_get_be16u(&g) != JPEG2000_SOC) { av_log(s, AV_LOG_ERROR, "Mandatory SOC marker is not present\n"); - return AVERROR(AVERROR_INVALIDDATA); + return AVERROR_INVALIDDATA; } /* Extract usefull size information from the SIZ marker */ if (bytestream2_get_be16u(&g) != JPEG2000_SIZ) { av_log(s, AV_LOG_ERROR, "Mandatory SIZ marker is not present\n"); - return AVERROR(AVERROR_INVALIDDATA); + return AVERROR_INVALIDDATA; } bytestream2_skip(&g, 2); // Skip Lsiz sc->j2k_info.j2k_cap = bytestream2_get_be16u(&g); @@ -2677,7 +2677,7 @@ static int mxf_parse_jpeg2000_frame(AVFormatContext *s, AVStream *st, AVPacket * j2k_ncomponents = bytestream2_get_be16u(&g); if (j2k_ncomponents != component_count) { av_log(s, AV_LOG_ERROR, "Incoherence about components image number.\n"); - return AVERROR(AVERROR_INVALIDDATA); + return AVERROR_INVALIDDATA; } bytestream2_get_bufferu(&g, sc->j2k_info.j2k_comp_desc, 3 * j2k_ncomponents);
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/mxfenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)