diff options
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vsrc_buffer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/vsrc_buffer.c b/libavfilter/vsrc_buffer.c index b43de06..3624493 100644 --- a/libavfilter/vsrc_buffer.c +++ b/libavfilter/vsrc_buffer.c @@ -39,6 +39,12 @@ typedef struct { char sws_param[256]; } BufferSourceContext; +#define CHECK_PARAM_CHANGE(s, c, width, height, format)\ + if (c->w != width || c->h != height || c->pix_fmt != format) {\ + av_log(s, AV_LOG_ERROR, "Changing frame properties on the fly is not supported.\n");\ + return AVERROR(EINVAL);\ + } + int av_vsrc_buffer_add_video_buffer_ref(AVFilterContext *buffer_filter, AVFilterBufferRef *picref, int flags) { @@ -125,6 +131,8 @@ int av_buffersrc_buffer(AVFilterContext *s, AVFilterBufferRef *buf) return AVERROR(EINVAL); } +// CHECK_PARAM_CHANGE(s, c, buf->video->w, buf->video->h, buf->format); + c->picref = buf; return 0; |