Merge commit '018bdaed37d2f1735dbecfc58309a1a164abadd5'
authorHendrik Leppkes <h.leppkes@gmail.com>
Wed, 11 Nov 2015 13:56:32 +0000 (14:56 +0100)
committerHendrik Leppkes <h.leppkes@gmail.com>
Wed, 11 Nov 2015 13:56:53 +0000 (14:56 +0100)
* commit '018bdaed37d2f1735dbecfc58309a1a164abadd5':
  setpts: add FRAME_RATE constant

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
1  2 
libavfilter/setpts.c

@@@ -123,17 -113,18 +123,18 @@@ static int config_input(AVFilterLink *i
      setpts->var_values[VAR_TB] = av_q2d(inlink->time_base);
      setpts->var_values[VAR_RTCSTART] = av_gettime();
  
 -    if (inlink->type == AVMEDIA_TYPE_AUDIO) {
 -        setpts->var_values[VAR_SR] = inlink->sample_rate;
 -    }
 +    setpts->var_values[VAR_SR] =
 +    setpts->var_values[VAR_SAMPLE_RATE] =
 +        setpts->type == AVMEDIA_TYPE_AUDIO ? inlink->sample_rate : NAN;
  
-     setpts->var_values[VAR_FRAME_RATE] = inlink->frame_rate.num && inlink->frame_rate.den ?
-         av_q2d(inlink->frame_rate) : NAN;
+     setpts->var_values[VAR_FRAME_RATE] = inlink->frame_rate.num &&
+                                          inlink->frame_rate.den ?
+                                             av_q2d(inlink->frame_rate) : NAN;
  
 -    // Indicate the output can be variable framerate.
 -    inlink->frame_rate = (AVRational){1, 0};
 -
 -    av_log(inlink->src, AV_LOG_VERBOSE, "TB:%f\n", setpts->var_values[VAR_TB]);
 +    av_log(inlink->src, AV_LOG_VERBOSE, "TB:%f FRAME_RATE:%f SAMPLE_RATE:%f\n",
 +           setpts->var_values[VAR_TB],
 +           setpts->var_values[VAR_FRAME_RATE],
 +           setpts->var_values[VAR_SAMPLE_RATE]);
      return 0;
  }