Compute the outpicref PTS in start_frame(), since it is required for comparing that value with the value of the overpicref. Originally committed as revision 25828 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -212,6 +212,8 @@ static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref) · 211 unmodified lines | ||
| 212 | 212 | OverlayContext *over = ctx->priv; |
| 213 | 213 | |
| 214 | 214 | inlink->dst->outputs[0]->out_buf = outpicref; |
| 215 | + outpicref->pts = av_rescale_q(outpicref->pts, ctx->inputs[MAIN]->time_base, | |
| 216 | + ctx->outputs[0]->time_base); | |
| 215 | 217 | |
| 216 | 218 | if (!over->overpicref || over->overpicref->pts < outpicref->pts) { |
| 217 | 219 | AVFilterBufferRef *old = over->overpicref; |
| @@ -322,9 +324,6 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) · 104 unmodified lines | ||
| 322 | 324 | AVFilterBufferRef *outpicref = outlink->out_buf; |
| 323 | 325 | OverlayContext *over = ctx->priv; |
| 324 | 326 | |
| 325 | − outpicref->pts = av_rescale_q(outpicref->pts, ctx->inputs[MAIN]->time_base, | |
| 326 | − outlink->time_base); | |
| 327 | − | |
| 328 | 327 | if (over->overpicref && |
| 329 | 328 | !(over->x >= outpicref->video->w || over->y >= outpicref->video->h || |
| 330 | 329 | y+h < over->y || y >= over->y + over->overpicref->video->h)) { |