* [FFmpeg-devel] [PATCH] avformat/mxfenc: Remove AVERROR²
@ 2024-01-23 1:47 Michael Niedermayer
2024-01-23 11:46 ` James Almer
2024-01-23 12:56 ` Tomas Härdin
0 siblings, 2 replies; 4+ messages in thread
From: Michael Niedermayer @ 2024-01-23 1:47 UTC (permalink / raw)
To: FFmpeg development discussions and patches
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);
--
2.17.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: Remove AVERROR²
2024-01-23 1:47 [FFmpeg-devel] [PATCH] avformat/mxfenc: Remove AVERROR² Michael Niedermayer
@ 2024-01-23 11:46 ` James Almer
2024-01-23 12:56 ` Tomas Härdin
1 sibling, 0 replies; 4+ messages in thread
From: James Almer @ 2024-01-23 11:46 UTC (permalink / raw)
To: ffmpeg-devel
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.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: Remove AVERROR²
2024-01-23 1:47 [FFmpeg-devel] [PATCH] avformat/mxfenc: Remove AVERROR² Michael Niedermayer
2024-01-23 11:46 ` James Almer
@ 2024-01-23 12:56 ` Tomas Härdin
2024-01-23 20:04 ` Michael Niedermayer
1 sibling, 1 reply; 4+ messages in thread
From: Tomas Härdin @ 2024-01-23 12:56 UTC (permalink / raw)
To: FFmpeg development discussions and patches
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
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: Remove AVERROR²
2024-01-23 12:56 ` Tomas Härdin
@ 2024-01-23 20:04 ` Michael Niedermayer
0 siblings, 0 replies; 4+ messages in thread
From: Michael Niedermayer @ 2024-01-23 20:04 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 2082 bytes --]
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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-23 20:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-23 1:47 [FFmpeg-devel] [PATCH] avformat/mxfenc: Remove AVERROR² Michael Niedermayer
2024-01-23 11:46 ` James Almer
2024-01-23 12:56 ` Tomas Härdin
2024-01-23 20:04 ` Michael Niedermayer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git