Opened 6 years ago

Closed 6 years ago

#94 closed defect (fixed)

Duplicate #define OPT_STR in libx264.c

Reported by: RLeatherwood Owned by:
Priority: normal Component: avcodec
Version: git Keywords: libx264 x264
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

After commit 2c18893 to libx264.c, there is a duplicate #define OPT_STR:

        if (avctx->bit_rate == 200*100)
            avctx->crf = 23;
    }
}

#define OPT_STR(opt,param)                                            
   do { 
      if (param && x264_param_parse(&x4->params, opt, param) < 0) { \
          av_log(avctx, AV_LOG_ERROR,                               \
                 "bad value for '%s': '%s'\n", opt, param);         \
          return -1;                                                \
        }                                                           \
   } while (0);                                                     \

#define OPT_STR(opt,param)                                            
   do { 
      if (param && x264_param_parse(&x4->params, opt, param) < 0) { \
          av_log(avctx, AV_LOG_ERROR,                               \
                 "bad value for '%s': '%s'\n", opt, param);         \
          return -1;                                                \
        }                                                           \
   } while (0);                                                     \

static av_cold int X264_init(AVCodecContext *avctx)
{
    X264Context *x4 = avctx->priv_data;

I have attached a patch that removes the duplicate #define.

Attachments (1)

ffmpeg-libx264-remove-duplicate-OPT_STR.patch (1.0 KB) - added by RLeatherwood 6 years ago.

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by RLeatherwood

comment:1 Changed 6 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from new to closed

Patch applied, thank you!

Note: See TracTickets for help on using tickets.