avutil/opt: add missing case for AV_OPT_TYPE_CHLAYOUT in av_opt_free()

Fixes potential memleaks for existing options of this type.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2022-03-18 18:46:40 -03:00
parent 710e51677a
commit 327efa6633
1 changed files with 4 additions and 0 deletions

View File

@ -1729,6 +1729,10 @@ void av_opt_free(void *obj)
av_dict_free((AVDictionary **)(((uint8_t *)obj) + o->offset)); av_dict_free((AVDictionary **)(((uint8_t *)obj) + o->offset));
break; break;
case AV_OPT_TYPE_CHLAYOUT:
av_channel_layout_uninit((AVChannelLayout *)(((uint8_t *)obj) + o->offset));
break;
default: default:
break; break;
} }