summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-01-31 20:48:35 +0100
committerAnton Khirnov <anton@khirnov.net>2011-04-26 07:38:24 +0200
commit7a11c82fb760619d0e17ca234381b50d6c675cc0 (patch)
tree49dae2b00d22741477c930b1ac9089c72c0a1b75 /libavfilter
parent2f84bb4236accadffdfad30a5ec0d80e72449f15 (diff)
vsrc_buffer: add sample_aspect_ratio fields to arguments.
This fixes aspect handling in ffmpeg. This is based on a patch by Baptiste. Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfilter.h2
-rw-r--r--libavfilter/vsrc_buffer.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 19f9f6923a..a1eff6e739 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -26,7 +26,7 @@
#include "libavutil/samplefmt.h"
#define LIBAVFILTER_VERSION_MAJOR 2
-#define LIBAVFILTER_VERSION_MINOR 1
+#define LIBAVFILTER_VERSION_MINOR 2
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
diff --git a/libavfilter/vsrc_buffer.c b/libavfilter/vsrc_buffer.c
index 93f2367ab8..dea41de721 100644
--- a/libavfilter/vsrc_buffer.c
+++ b/libavfilter/vsrc_buffer.c
@@ -68,8 +68,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
int n = 0;
if (!args ||
- (n = sscanf(args, "%d:%d:%127[^:]:%d:%d", &c->w, &c->h, pix_fmt_str, &c->time_base.num, &c->time_base.den)) != 5) {
- av_log(ctx, AV_LOG_ERROR, "Expected 5 arguments, but only %d found in '%s'\n", n, args);
+ (n = sscanf(args, "%d:%d:%127[^:]:%d:%d:%d:%d", &c->w, &c->h, pix_fmt_str,
+ &c->time_base.num, &c->time_base.den,
+ &c->pixel_aspect.num, &c->pixel_aspect.den)) != 7) {
+ av_log(ctx, AV_LOG_ERROR, "Expected 7 arguments, but only %d found in '%s'\n", n, args);
return AVERROR(EINVAL);
}
if ((c->pix_fmt = av_get_pix_fmt(pix_fmt_str)) == PIX_FMT_NONE) {
@@ -100,6 +102,7 @@ static int config_props(AVFilterLink *link)
link->w = c->w;
link->h = c->h;
+ link->sample_aspect_ratio = c->pixel_aspect;
link->time_base = c->time_base;
return 0;