|
|
@@ -91,6 +91,7 @@ typedef struct { |
|
|
|
int main_pix_step[4]; ///< steps per pixel for each plane of the main output |
|
|
|
int overlay_pix_step[4]; ///< steps per pixel for each plane of the overlay |
|
|
|
int hsub, vsub; ///< chroma subsampling values |
|
|
|
int shortest; ///< terminate stream when the shortest input terminates |
|
|
|
|
|
|
|
char *x_expr, *y_expr; |
|
|
|
} OverlayContext; |
|
|
@@ -102,6 +103,7 @@ static const AVOption overlay_options[] = { |
|
|
|
{ "x", "set the x expression", OFFSET(x_expr), AV_OPT_TYPE_STRING, {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS }, |
|
|
|
{ "y", "set the y expression", OFFSET(y_expr), AV_OPT_TYPE_STRING, {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS }, |
|
|
|
{"rgb", "force packed RGB in input and output", OFFSET(allow_packed_rgb), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, FLAGS }, |
|
|
|
{ "shortest", "force termination when the shortest input terminates", OFFSET(shortest), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, FLAGS }, |
|
|
|
{NULL}, |
|
|
|
}; |
|
|
|
|
|
|
@@ -560,6 +562,8 @@ static int request_frame(AVFilterLink *outlink) |
|
|
|
/* EOF on main is reported immediately */ |
|
|
|
if (ret == AVERROR_EOF && input == OVERLAY) { |
|
|
|
over->overlay_eof = 1; |
|
|
|
if (over->shortest) |
|
|
|
return ret; |
|
|
|
if ((ret = try_filter_next_frame(ctx)) != AVERROR(EAGAIN)) |
|
|
|
return ret; |
|
|
|
ret = 0; /* continue requesting frames on main */ |
|
|
|