Commit df804041 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '6599b087'

* commit '6599b087':
  buffersrc: fix a typo.
  lavc, lavfi: fix counting number of planes in AVBufferRef wrappers
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 17ebef2f 6599b087
......@@ -757,11 +757,11 @@ do { \
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
if (!desc) {
planes = av_pix_fmt_count_planes(frame->format);
if (!desc || planes <= 0) {
ret = AVERROR(EINVAL);
goto fail;
}
planes = (desc->flags & PIX_FMT_PLANAR) ? desc->nb_components : 1;
for (i = 0; i < planes; i++) {
int v_shift = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
......
......@@ -234,11 +234,11 @@ do { \
if (ctx->outputs[0]->type == AVMEDIA_TYPE_VIDEO) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
if (!desc) {
planes = av_pix_fmt_count_planes(frame->format);
if (!desc || planes <= 0) {
ret = AVERROR(EINVAL);
goto fail;
}
planes = (desc->flags & PIX_FMT_PLANAR) ? desc->nb_components : 1;
for (i = 0; i < planes; i++) {
int v_shift = (i == 1 || i == 2) ? desc->log2_chroma_h : 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment