diff mbox

[FFmpeg-devel] lavf/mxfenc: Remove a write-only variable

Message ID CAB0OVGqHZrawaKEzcg3Bmppe9XoxLE85bgs51y5MZOfFcLxXOA@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos Oct. 13, 2018, 11:12 a.m. UTC
Hi!

Attached patch fixes a warning, I wonder if the value is actually
supposed to use somewhere...

Please comment, Carl Eugen

Comments

Carl Eugen Hoyos Oct. 16, 2018, 10 p.m. UTC | #1
2018-10-13 13:12 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:

> Attached patch fixes a warning, I wonder if the value is actually
> supposed to use somewhere...

Ping.

Carl Eugen
Baptiste Coudurier Oct. 17, 2018, 6:28 p.m. UTC | #2
Hi Carl,

On Tue, Oct 16, 2018 at 3:00 PM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:

> 2018-10-13 13:12 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:
>
> > Attached patch fixes a warning, I wonder if the value is actually
> > supposed to use somewhere...
>
> Ping.
>

LGTM.
Carl Eugen Hoyos Oct. 17, 2018, 6:49 p.m. UTC | #3
2018-10-17 20:28 GMT+02:00, Baptiste Coudurier <baptiste.coudurier@gmail.com>:
> Hi Carl,
>
> On Tue, Oct 16, 2018 at 3:00 PM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>
>> 2018-10-13 13:12 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:
>>
>> > Attached patch fixes a warning, I wonder if the value is actually
>> > supposed to use somewhere...
>>
>> Ping.
>>
>
> LGTM.

Patch applied.

Thank you, Carl Eugen
diff mbox

Patch

From ee679d874aeacc027edcd370464bd7ea7fd7ae7d Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Sat, 13 Oct 2018 13:10:29 +0200
Subject: [PATCH] lavf/mxfenc: Remove a write-only variable.

Fixes the following warning:
libavformat/mxfenc.c:2125:22: warning: variable 'frame_size' set but not used
---
 libavformat/mxfenc.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index f6acf80..a2f68dd 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -2122,7 +2122,7 @@  static int mxf_parse_dv_frame(AVFormatContext *s, AVStream *st, AVPacket *pkt)
     MXFContext *mxf = s->priv_data;
     MXFStreamContext *sc = st->priv_data;
     uint8_t *vs_pack, *vsc_pack;
-    int ul_index, frame_size, stype, pal;
+    int ul_index, stype, pal;
     const AVDVProfile *profile;
 
     if (mxf->header_written)
@@ -2153,7 +2153,6 @@  static int mxf_parse_dv_frame(AVFormatContext *s, AVStream *st, AVPacket *pkt)
     switch (stype) {
     case 0x18: // DV100 720p
         ul_index = INDEX_DV100_720_50 + pal;
-        frame_size = pal ? 288000 : 240000;
         if (sc->interlaced) {
             av_log(s, AV_LOG_ERROR, "source marked as interlaced but codec profile is progressive\n");
             sc->interlaced = 0;
@@ -2161,20 +2160,16 @@  static int mxf_parse_dv_frame(AVFormatContext *s, AVStream *st, AVPacket *pkt)
         break;
     case 0x14: // DV100 1080i
         ul_index = INDEX_DV100_1080_50 + pal;
-        frame_size = pal ? 576000 : 480000;
         break;
     case 0x04: // DV50
         ul_index = INDEX_DV50_525_60 + pal;
-        frame_size = pal ? 288000 : 240000;
         break;
     default: // DV25
         if (profile && profile->pix_fmt == AV_PIX_FMT_YUV420P && pal) {
             ul_index = INDEX_DV25_525_60_IEC + pal;
-            frame_size = pal ? 144000 : 120000;
             break;
         }
         ul_index = INDEX_DV25_525_60 + pal;
-        frame_size = pal ? 144000 : 120000;
     }
 
     sc->index = ul_index;
-- 
1.7.10.4