mirror of
				https://github.com/nyanmisaka/ffmpeg-rockchip.git
				synced 2025-10-30 20:16:42 +08:00 
			
		
		
		
	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>
This commit is contained in:
		| @@ -650,6 +650,9 @@ const AVOption *av_opt_find2(void *obj, const char *name, const char *unit, | |||||||
|     const AVClass  *c = *(AVClass**)obj; |     const AVClass  *c = *(AVClass**)obj; | ||||||
|     const AVOption *o = NULL; |     const AVOption *o = NULL; | ||||||
|  |  | ||||||
|  |     if (!c) | ||||||
|  |         return NULL; | ||||||
|  |  | ||||||
|     if (search_flags & AV_OPT_SEARCH_CHILDREN) { |     if (search_flags & AV_OPT_SEARCH_CHILDREN) { | ||||||
|         if (search_flags & AV_OPT_SEARCH_FAKE_OBJ) { |         if (search_flags & AV_OPT_SEARCH_FAKE_OBJ) { | ||||||
|             const AVClass *child = NULL; |             const AVClass *child = NULL; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Martin Storsjö
					Martin Storsjö