1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit '6599b087de62a5f9f2a8d61a1952d777d1bff804'

* commit '6599b087de62a5f9f2a8d61a1952d777d1bff804':
  buffersrc: fix a typo.
  lavc, lavfi: fix counting number of planes in AVBufferRef wrappers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-03-20 11:30:49 +01:00
commit df804041bd
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;