Browse Source

Do not fail in get_buffer_internal() if pix_fmt planes == 0.

Fixes VDPAU decoding, reported by Ilja Sekler
tags/n2.0
Carl Eugen Hoyos 12 years ago
parent
commit
ac9b056ddb
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/utils.c

+ 2
- 0
libavcodec/utils.c View File

@@ -758,6 +758,8 @@ do { \
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);

planes = av_pix_fmt_count_planes(frame->format);
if (!planes)
planes = 1;
if (!desc || planes <= 0) {
ret = AVERROR(EINVAL);
goto fail;


Loading…
Cancel
Save