History

lavfi/buffersrc: issue more specific error in case of invalid parameters

Stefano Sabatini committed 3 years ago

Commit ad17e291 parent 3153c441 file · +10 −3Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/buffersrc.c+10−3
@@ -273,9 +273,16 @@ static av_cold int init_video(AVFilterContext *ctx) · 272 unmodified lines
273{273{
274 BufferSourceContext *c = ctx->priv;274 BufferSourceContext *c = ctx->priv;
275 275
276 if (c->pix_fmt == AV_PIX_FMT_NONE || !c->w || !c->h ||276 if (c->pix_fmt == AV_PIX_FMT_NONE) {
277 av_q2d(c->time_base) <= 0) {277 av_log(ctx, AV_LOG_ERROR, "Unspecified pixel format\n");
278 av_log(ctx, AV_LOG_ERROR, "Invalid parameters provided.\n");278 return AVERROR(EINVAL);
279 }
280 if (c->w <= 0 || c->h <= 0) {
281 av_log(ctx, AV_LOG_ERROR, "Invalid size %dx%d\n", c->w, c->h);
282 return AVERROR(EINVAL);
283 }
284 if (av_q2d(c->time_base) <= 0) {
285 av_log(ctx, AV_LOG_ERROR, "Invalid time base %d/%d\n", c->time_base.num, c->time_base.den);
279 return AVERROR(EINVAL);286 return AVERROR(EINVAL);
280 }287 }
281 288

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