Since the PTS need double accuracy, the timebase denominator is doubled
as well, and this new time base is used for the timestamp unit.
... | ... |
@@ -41,11 +41,13 @@ static int config_props_output(AVFilterLink *outlink) |
41 | 41 |
return AVERROR_INVALIDDATA; |
42 | 42 |
} |
43 | 43 |
|
44 |
+ outlink->time_base.num = inlink->time_base.num; |
|
45 |
+ outlink->time_base.den = inlink->time_base.den * 2; |
|
44 | 46 |
outlink->frame_rate.num = inlink->frame_rate.num * 2; |
45 | 47 |
outlink->frame_rate.den = inlink->frame_rate.den; |
46 | 48 |
outlink->w = inlink->w; |
47 | 49 |
outlink->h = inlink->h / 2; |
48 |
- sf->ts_unit = av_q2d(av_inv_q(av_mul_q(outlink->frame_rate, inlink->time_base))); |
|
50 |
+ sf->ts_unit = av_q2d(av_inv_q(av_mul_q(outlink->frame_rate, outlink->time_base))); |
|
49 | 51 |
|
50 | 52 |
return 0; |
51 | 53 |
} |