diff mbox series

[FFmpeg-devel,4/5] avformat/mxfenc: Remove dead code

Message ID 20240607003215.1723906-4-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/5] avformat/mov: Check requested_sample before using it | expand

Checks

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

Commit Message

Michael Niedermayer June 7, 2024, 12:32 a.m. UTC
Fixes: CID1524681 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/mxfenc.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Tomas Härdin June 18, 2024, 2:32 p.m. UTC | #1
fre 2024-06-07 klockan 02:32 +0200 skrev Michael Niedermayer:
> Fixes: CID1524681 Logically dead code
> 
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/mxfenc.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> index f424858fc4e..b8e7bfe3018 100644
> --- a/libavformat/mxfenc.c
> +++ b/libavformat/mxfenc.c
> @@ -2606,9 +2606,6 @@ static int mxf_parse_ffv1_frame(AVFormatContext
> *s, AVStream *st, AVPacket *pkt)
>          ff_build_rac_states(&c, 0.05 * (1LL << 32), 256 - 8);
>          v = get_ffv1_unsigned_symbol(&c, state);
>          av_assert0(v >= 2);
> -        if (v > 4) {
> -            return 0;
> -        }
>          if (v > 4) {
>              av_log(s, AV_LOG_ERROR, "unsupported ffv1 version %d\n",
> v);
>              return 0;

Commit message isn't quite accurate - this rather resurrects the error
print

/Tomas
Michael Niedermayer July 2, 2024, 7:23 p.m. UTC | #2
On Tue, Jun 18, 2024 at 04:32:18PM +0200, Tomas Härdin wrote:
> fre 2024-06-07 klockan 02:32 +0200 skrev Michael Niedermayer:
> > Fixes: CID1524681 Logically dead code
> > 
> > Sponsored-by: Sovereign Tech Fund
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  libavformat/mxfenc.c | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> > index f424858fc4e..b8e7bfe3018 100644
> > --- a/libavformat/mxfenc.c
> > +++ b/libavformat/mxfenc.c
> > @@ -2606,9 +2606,6 @@ static int mxf_parse_ffv1_frame(AVFormatContext
> > *s, AVStream *st, AVPacket *pkt)
> >          ff_build_rac_states(&c, 0.05 * (1LL << 32), 256 - 8);
> >          v = get_ffv1_unsigned_symbol(&c, state);
> >          av_assert0(v >= 2);
> > -        if (v > 4) {
> > -            return 0;
> > -        }
> >          if (v > 4) {
> >              av_log(s, AV_LOG_ERROR, "unsupported ffv1 version %d\n",
> > v);
> >              return 0;
> 
> Commit message isn't quite accurate - this rather resurrects the error
> print

right
will apply with a better commit message

thx

[...]
diff mbox series

Patch

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index f424858fc4e..b8e7bfe3018 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -2606,9 +2606,6 @@  static int mxf_parse_ffv1_frame(AVFormatContext *s, AVStream *st, AVPacket *pkt)
         ff_build_rac_states(&c, 0.05 * (1LL << 32), 256 - 8);
         v = get_ffv1_unsigned_symbol(&c, state);
         av_assert0(v >= 2);
-        if (v > 4) {
-            return 0;
-        }
         if (v > 4) {
             av_log(s, AV_LOG_ERROR, "unsupported ffv1 version %d\n", v);
             return 0;