[FFmpeg-devel] avcodec/vp9_raw_reorder_bsf.c fix deadcode

Submitted by darling.zhong on Nov. 8, 2019, 2:29 a.m.

Details

Message ID 7c1ed25e.ef9a9.16e48d891be.Coremail.dalingzhong@yeah.net
State New
Headers show

Commit Message

darling.zhong Nov. 8, 2019, 2:29 a.m.
Here if (in->data[in->size - 1] & 0) nerver true?


Signed-off-by: darling.zhong <dalingzhong@yeah.net>
---
 libavcodec/vp9_raw_reorder_bsf.c | 2 +-
 patcheck.tmp                     | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 libavcodec/vp9_raw_reorder_bsf.c
 create mode 100644 patcheck.tmp


diff --git a/patcheck.tmp b/patcheck.tmp
new file mode 100644
index 0000000000..e69de29bb2

Comments

Andreas Rheinhardt Nov. 8, 2019, 10:57 a.m.
darling.zhong:
> Here if (in->data[in->size - 1] & 0) nerver true?
> 
> 
> Signed-off-by: darling.zhong <dalingzhong@yeah.net>
> ---
>  libavcodec/vp9_raw_reorder_bsf.c | 2 +-
>  patcheck.tmp                     | 0
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  mode change 100644 => 100755 libavcodec/vp9_raw_reorder_bsf.c
>  create mode 100644 patcheck.tmp
> 
> 
> diff --git a/libavcodec/vp9_raw_reorder_bsf.c b/libavcodec/vp9_raw_reorder_bsf.c
> old mode 100644
> new mode 100755
> index f19b4c7198..e55a358457
> --- a/libavcodec/vp9_raw_reorder_bsf.c
> +++ b/libavcodec/vp9_raw_reorder_bsf.c
> @@ -292,7 +292,7 @@ static int vp9_raw_reorder_filter(AVBSFContext *bsf, AVPacket *out)
>              return err;
>          }
>  
> -        if (in->data[in->size - 1] & 0xe0 == 0xc0) {
> +        if ((in->data[in->size - 1] & 0xe0) == 0xc0) {
>              av_log(bsf, AV_LOG_ERROR, "Input in superframes is not "
>                     "supported.\n");
>              av_packet_free(&in);
> diff --git a/patcheck.tmp b/patcheck.tmp
> new file mode 100644
> index 0000000000..e69de29bb2
> 
Already suggested in
https://ffmpeg.org/pipermail/ffmpeg-devel/2019-September/250772.html.

- Andreas
Michael Niedermayer Nov. 8, 2019, 10:41 p.m.
On Fri, Nov 08, 2019 at 10:29:42AM +0800, darling.zhong wrote:
> Here if (in->data[in->size - 1] & 0) nerver true?
> 
> 
> Signed-off-by: darling.zhong <dalingzhong@yeah.net>
> ---
>  libavcodec/vp9_raw_reorder_bsf.c | 2 +-
>  patcheck.tmp                     | 0
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  mode change 100644 => 100755 libavcodec/vp9_raw_reorder_bsf.c
>  create mode 100644 patcheck.tmp
> 
> 
> diff --git a/libavcodec/vp9_raw_reorder_bsf.c b/libavcodec/vp9_raw_reorder_bsf.c
> old mode 100644
> new mode 100755
> index f19b4c7198..e55a358457
> --- a/libavcodec/vp9_raw_reorder_bsf.c
> +++ b/libavcodec/vp9_raw_reorder_bsf.c
> @@ -292,7 +292,7 @@ static int vp9_raw_reorder_filter(AVBSFContext *bsf, AVPacket *out)
>              return err;
>          }
>  
> -        if (in->data[in->size - 1] & 0xe0 == 0xc0) {
> +        if ((in->data[in->size - 1] & 0xe0) == 0xc0) {
>              av_log(bsf, AV_LOG_ERROR, "Input in superframes is not "
>                     "supported.\n");
>              av_packet_free(&in);

> diff --git a/patcheck.tmp b/patcheck.tmp
> new file mode 100644
> index 0000000000..e69de29bb2

this should not be in the patch

thx

[...]

Patch hide | download patch | download mbox

diff --git a/libavcodec/vp9_raw_reorder_bsf.c b/libavcodec/vp9_raw_reorder_bsf.c
old mode 100644
new mode 100755
index f19b4c7198..e55a358457
--- a/libavcodec/vp9_raw_reorder_bsf.c
+++ b/libavcodec/vp9_raw_reorder_bsf.c
@@ -292,7 +292,7 @@  static int vp9_raw_reorder_filter(AVBSFContext *bsf, AVPacket *out)
             return err;
         }
 
-        if (in->data[in->size - 1] & 0xe0 == 0xc0) {
+        if ((in->data[in->size - 1] & 0xe0) == 0xc0) {
             av_log(bsf, AV_LOG_ERROR, "Input in superframes is not "
                    "supported.\n");
             av_packet_free(&in);