Showing the changes to libavfilter/vsrc_buffer.c (1 of 5 files). Show all
Unified · Split
| @@ -68,8 +68,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) · 67 unmodified lines | ||
| 68 | 68 | int n = 0; |
| 69 | 69 | |
| 70 | 70 | if (!args || |
| 71 | − (n = sscanf(args, "%d:%d:%127[^:]:%d:%d", &c->w, &c->h, pix_fmt_str, &c->time_base.num, &c->time_base.den)) != 5) { | |
| 72 | − av_log(ctx, AV_LOG_ERROR, "Expected 5 arguments, but only %d found in '%s'\n", n, args); | |
| 71 | + (n = sscanf(args, "%d:%d:%127[^:]:%d:%d:%d:%d", &c->w, &c->h, pix_fmt_str, | |
| 72 | + &c->time_base.num, &c->time_base.den, | |
| 73 | + &c->pixel_aspect.num, &c->pixel_aspect.den)) != 7) { | |
| 74 | + av_log(ctx, AV_LOG_ERROR, "Expected 7 arguments, but only %d found in '%s'\n", n, args); | |
| 73 | 75 | return AVERROR(EINVAL); |
| 74 | 76 | } |
| 75 | 77 | if ((c->pix_fmt = av_get_pix_fmt(pix_fmt_str)) == PIX_FMT_NONE) { |
| @@ -100,6 +102,7 @@ static int config_props(AVFilterLink *link) · 24 unmodified lines | ||
| 100 | 102 | |
| 101 | 103 | link->w = c->w; |
| 102 | 104 | link->h = c->h; |
| 105 | + link->sample_aspect_ratio = c->pixel_aspect; | |
| 103 | 106 | link->time_base = c->time_base; |
| 104 | 107 | |
| 105 | 108 | return 0; |