Ticket #94 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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

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

Change History

Changed 2 years ago by RLeatherwood

comment:1 Changed 2 years ago by cehoyos

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

Patch applied, thank you!

Note: See TracTickets for help on using tickets.