History

Add sample_aspect_ratio fields to vsrc_buffer arguments. This fixes aspect handling in ffmpeg This is based on a patch by baptiste

Michael Niedermayer committed 15 years ago

Commit 7b3ea551 parent 14b171c5 files · +33 −8Browse files

Showing the changes to libavfilter/vsrc_buffer.c (1 of 5 files). Show all

Unified · Split

libavfilter/vsrc_buffer.c+5−2
@@ -68,8 +68,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque) · 67 unmodified lines
6868 int n = 0;
6969
7070 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);
7375 return AVERROR(EINVAL);
7476 }
7577 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
100102
101103 link->w = c->w;
102104 link->h = c->h;
105+ link->sample_aspect_ratio = c->pixel_aspect;
103106 link->time_base = c->time_base;
104107
105108 return 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t