Skip to content

Commit

Permalink
ff-save: do not override video_bit_rate_to 0 unless set
Browse files Browse the repository at this point in the history
  • Loading branch information
hodefoting committed Nov 27, 2015
1 parent f319ffe commit 00021a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions operations/external/ff-save.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ property_int (noise_reduction, _("noise reduction"), 0)
property_int (scenechange_threshold, _("scenechange threshold"), 0)
property_int (video_bit_rate_min, _("video bitrate min"), 0)
property_int (video_bit_rate_max, _("video bitrate max"), 0)
property_int (video_bit_rate_tolerance, _("video bitrate tolerance"), 0)
property_int (video_bit_rate_tolerance, _("video bitrate tolerance"), -1)

property_int (keyint_min, _("keyint-min"), 0)
property_int (trellis, _("trellis"), 0)
Expand Down Expand Up @@ -493,7 +493,8 @@ add_video_stream (GeglProperties *o, AVFormatContext * oc, int codec_id)
c->bit_rate = o->video_bit_rate * 1000;
c->rc_min_rate = o->video_bit_rate_min * 1000;
c->rc_max_rate = o->video_bit_rate_max * 1000;
c->bit_rate_tolerance = o->video_bit_rate_tolerance * 1000;
if (o->video_bit_rate_tolerance >= 0)
c->bit_rate_tolerance = o->video_bit_rate_tolerance * 1000;
/* resolution must be a multiple of two */
c->width = p->width;
c->height = p->height;
Expand Down

0 comments on commit 00021a5

Please sign in to comment.