Message ID | GV1P250MB073720D51C49E7A5B080673F8F7B9@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Accepted |
Commit | 61c37bc61d6ff08d52c5f9e01b9ba45e957031ca |
Headers | show |
Series | [FFmpeg-devel] avcodec/libtheoraenc: Do not use invalid error code | 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 Thu, Sep 1, 2022 at 11:50 PM Andreas Rheinhardt < andreas.rheinhardt@outlook.com> wrote: > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > libavcodec/libtheoraenc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > So it currently does not compile or? > diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c > index 22835553d6..92bf3a133c 100644 > --- a/libavcodec/libtheoraenc.c > +++ b/libavcodec/libtheoraenc.c > @@ -119,7 +119,7 @@ static int get_stats(AVCodecContext *avctx, int eos) > return 0; > #else > av_log(avctx, AV_LOG_ERROR, "libtheora too old to support 2pass\n"); > - return AVERROR(ENOSUP); > + return AVERROR(ENOTSUP); > #endif > } > > @@ -158,7 +158,7 @@ static int submit_stats(AVCodecContext *avctx) > return 0; > #else > av_log(avctx, AV_LOG_ERROR, "libtheora too old to support 2pass\n"); > - return AVERROR(ENOSUP); > + return AVERROR(ENOTSUP); > #endif > } > > -- > 2.34.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". >
Paul B Mahol: > On Thu, Sep 1, 2022 at 11:50 PM Andreas Rheinhardt < > andreas.rheinhardt@outlook.com> wrote: > >> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> >> --- >> libavcodec/libtheoraenc.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> So it currently does not compile or? > This is in an #else that has apparently never been tested. 800841fd0c6c686c62bdd482e46b6c61b72fa531 (November 2009) added the #ifdefery for compatibility with libtheora 1.0 and 8cb76ef275f7e4be049ac7d6dbfc23186ec73631 (Nov 2012) improved the returned error codes and added the mistake. We could also drop support for libtheora 1.0. > > >> diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c >> index 22835553d6..92bf3a133c 100644 >> --- a/libavcodec/libtheoraenc.c >> +++ b/libavcodec/libtheoraenc.c >> @@ -119,7 +119,7 @@ static int get_stats(AVCodecContext *avctx, int eos) >> return 0; >> #else >> av_log(avctx, AV_LOG_ERROR, "libtheora too old to support 2pass\n"); >> - return AVERROR(ENOSUP); >> + return AVERROR(ENOTSUP); >> #endif >> } >> >> @@ -158,7 +158,7 @@ static int submit_stats(AVCodecContext *avctx) >> return 0; >> #else >> av_log(avctx, AV_LOG_ERROR, "libtheora too old to support 2pass\n"); >> - return AVERROR(ENOSUP); >> + return AVERROR(ENOTSUP); >> #endif >> } >> >> -- >> 2.34.1 >>
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > libavcodec/libtheoraenc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c > index 22835553d6..92bf3a133c 100644 > --- a/libavcodec/libtheoraenc.c > +++ b/libavcodec/libtheoraenc.c > @@ -119,7 +119,7 @@ static int get_stats(AVCodecContext *avctx, int eos) > return 0; > #else > av_log(avctx, AV_LOG_ERROR, "libtheora too old to support 2pass\n"); > - return AVERROR(ENOSUP); > + return AVERROR(ENOTSUP); > #endif > } > > @@ -158,7 +158,7 @@ static int submit_stats(AVCodecContext *avctx) > return 0; > #else > av_log(avctx, AV_LOG_ERROR, "libtheora too old to support 2pass\n"); > - return AVERROR(ENOSUP); > + return AVERROR(ENOTSUP); > #endif > } > Will apply this patch tomorrow unless there are objections. - Andreas
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index 22835553d6..92bf3a133c 100644 --- a/libavcodec/libtheoraenc.c +++ b/libavcodec/libtheoraenc.c @@ -119,7 +119,7 @@ static int get_stats(AVCodecContext *avctx, int eos) return 0; #else av_log(avctx, AV_LOG_ERROR, "libtheora too old to support 2pass\n"); - return AVERROR(ENOSUP); + return AVERROR(ENOTSUP); #endif } @@ -158,7 +158,7 @@ static int submit_stats(AVCodecContext *avctx) return 0; #else av_log(avctx, AV_LOG_ERROR, "libtheora too old to support 2pass\n"); - return AVERROR(ENOSUP); + return AVERROR(ENOTSUP); #endif }
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/libtheoraenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)