Merge commit 'cb6f8245aed2c26fe95c30cd68c45983277a945a'

* commit 'cb6f8245aed2c26fe95c30cd68c45983277a945a':
  cmdutils: Allow calling filter_codec_opts without a set encoder
  pnm: Use av_pix_fmt_desc_get instead of accessing the array directly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-03-01 12:47:53 +01:00
commit 46f4b468e2
1 changed files with 1 additions and 3 deletions

View File

@ -1749,10 +1749,8 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
if (!codec)
codec = s->oformat ? avcodec_find_encoder(codec_id)
: avcodec_find_decoder(codec_id);
if (!codec)
return NULL;
switch (codec->type) {
switch (st->codec->codec_type) {
case AVMEDIA_TYPE_VIDEO:
prefix = 'v';
flags |= AV_OPT_FLAG_VIDEO_PARAM;