avopt: Check whether the object actually has got an AVClass
authorMartin Storsjö <martin@martin.st>
Mon, 29 Jul 2013 11:53:01 +0000 (14:53 +0300)
committerMartin Storsjö <martin@martin.st>
Wed, 31 Jul 2013 18:31:14 +0000 (21:31 +0300)
commitc7e921a54ffe7feb9f695c82f0a0764ab8d0f62b
treefb2b89fb5d1f9eb95823596002b0b688d0b00292
parentb7e6da988bfd5def40ccf3476eb8ce2f98a969a5
avopt: Check whether the object actually has got an AVClass

AVIOContext has got an av_class member that only gets set if
opening the context using avio_open2, but not if allocating a
custom IO context. A caller that wants to read AVOptions from
an AVIOContext (recursively using AV_OPT_SEARCH_CHILDREN) may
not know if the AVIOContext actually has got a class set or not.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavutil/opt.c