diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2013-03-10 16:28:33 +0100 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2013-03-10 17:05:55 +0100 |
commit | b71db3f38eafeb05e068804e002984b0d232e5f6 (patch) | |
tree | 672a9cc0b007c73efe1ccdd3464633101cfd3c63 /libavfilter | |
parent | 03b87fe5e35d009c374b45f8646b16b427d599a7 (diff) | |
download | ffmpeg-b71db3f38eafeb05e068804e002984b0d232e5f6.tar.gz |
lavfi/buffersrc: do not dereference NULL frame.
frame = NULL is used to indicate EOF.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/buffersrc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 185018dfd9..be860aae23 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -93,9 +93,9 @@ int av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags { AVFrame *copy = NULL; int ret = 0; - int64_t layout = frame->channel_layout; - if (layout && av_get_channel_layout_nb_channels(layout) != av_frame_get_channels(frame)) { + if (frame && frame->channel_layout && + av_get_channel_layout_nb_channels(frame->channel_layout) != av_frame_get_channels(frame)) { av_log(0, AV_LOG_ERROR, "Layout indicates a different number of channels than actually present\n"); return AVERROR(EINVAL); } |