Avoid timescale conversion, simplify.
Unified · Split
| @@ -129,6 +129,7 @@ static int color_config_props(AVFilterLink *inlink) · 128 unmodified lines | |||
| 129 | is_packed_rgba ? "rgba" : "yuva"); | 129 | is_packed_rgba ? "rgba" : "yuva"); |
| 130 | inlink->w = color->w; | 130 | inlink->w = color->w; |
| 131 | inlink->h = color->h; | 131 | inlink->h = color->h; |
| 132 | inlink->time_base = color->time_base; | ||
| 132 | 133 | ||
| 133 | return 0; | 134 | return 0; |
| 134 | } | 135 | } |
| @@ -138,7 +139,7 @@ static int color_request_frame(AVFilterLink *link) · 3 unmodified lines | |||
| 138 | ColorContext *color = link->src->priv; | 139 | ColorContext *color = link->src->priv; |
| 139 | AVFilterBufferRef *picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, color->w, color->h); | 140 | AVFilterBufferRef *picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, color->w, color->h); |
| 140 | picref->video->sample_aspect_ratio = (AVRational) {1, 1}; | 141 | picref->video->sample_aspect_ratio = (AVRational) {1, 1}; |
| 141 | picref->pts = av_rescale_q(color->pts++, color->time_base, AV_TIME_BASE_Q); | 142 | picref->pts = color->pts++; |
| 142 | picref->pos = -1; | 143 | picref->pos = -1; |
| 143 | 144 | ||
| 144 | avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0)); | 145 | avfilter_start_frame(link, avfilter_ref_buffer(picref, ~0)); |